Skip to content

Commit

Permalink
Merge pull request #589 from appleboy/patch-3
Browse files Browse the repository at this point in the history
update readme: add YAML example.
  • Loading branch information
javierprovecho committed Apr 15, 2016
2 parents 3576efa + e67cd91 commit cf256f5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ $ curl -v --form user=user --form password=password http://localhost:8080/login
```


#### XML and JSON rendering
#### XML, JSON and YAML rendering

```go
func main() {
Expand Down Expand Up @@ -442,6 +442,10 @@ func main() {
c.XML(http.StatusOK, gin.H{"message": "hey", "status": http.StatusOK})
})

r.GET("/someYAML", func(c *gin.Context) {
c.YAML(http.StatusOK, gin.H{"message": "hey", "status": http.StatusOK})
})

// Listen and server on 0.0.0.0:8080
r.Run(":8080")
}
Expand Down

0 comments on commit cf256f5

Please sign in to comment.