aljun
efdd3c8b81
Add support for Protobuf format response and unit test ( #1479 )
...
`Gin` now have the `protobufBinding` function to check the request format, but didn't have a protobuf response function like `c.YAML()`.
In our company [ByteDance](http://bytedance.com/ ), the largest internet company using golang in China, we use `gin` to transfer __Protobuf__ instead of __Json__, we have to write some internal library to make some wrappers to achieve that, and the code is not elegant. So we really want such a feature.
2018-08-19 10:45:56 +08:00
田欧
f45c928a15
chore: use http.Status* instead of hard code ( #1482 )
2018-08-14 09:51:56 +08:00
田欧
6159213462
unify test data ( #1417 )
...
mkdir a test data dir.
2018-08-12 23:38:31 +08:00
田欧
1ae32f3a2c
improve render code coverage ( #1474 )
...
all code coverage > 99%
2018-08-12 22:02:37 +08:00
Rex Lee(李俊)
85221af84c
add json ASCII string render ( #1358 )
...
add a json render that rendering json as ASCII string
2018-07-03 17:17:08 +08:00
Jean-Christophe Lebreton
bf7803815b
Serve easily dynamic files with `DataFromReader` context method ( #1304 )
...
* Add DataFromReader context method
* Replace fmt by strconv.FormatInt
* Add pull request link to README
2018-05-12 11:00:42 +08:00
senhtry
8c24018290
Add Jsonp Support to Context ( #1333 )
2018-04-26 11:52:19 +08:00
田欧
dfe37ea6f1
unify assert.Equal usage ( #1327 )
...
* unify assert.Equal usage
* fix typo
2018-04-20 10:27:44 +08:00
田欧
783c7ee9c1
Add some test cases and run test cases on binding/render dir ( #1168 )
...
* Travis run test cases on binding and render dir and add some test cases for binding and render
2018-01-26 11:46:11 +08:00
Weilin Shi
a816f9e9db
Remove redundant if err != nil check ( #1202 )
...
* Remove redundant if err != nil check
* Return e.EncodeToken instead of create a new variable
2017-12-21 11:00:17 +08:00
Eason Lin
75ed286c60
feat: add SecureJSON func to prevent json hijacking
2017-07-08 01:21:30 +08:00
Harindu Perera
5be2123c1a
Added support for MessagePack binding and rendering ( #808 )
...
Added deps to vendor.json and fixed rendering bug
2017-02-23 22:08:37 +08:00
Bo-Yi Wu
787bff85e5
fix testing.
...
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-12-11 10:14:23 +08:00
Manu Mtz-Almeida
1f56e50083
Using Render() instead of Write()
2015-06-04 05:25:21 +02:00
Manu Mtz-Almeida
947b53d4a2
New Render API
2015-05-18 15:45:24 +02:00
Manu Mtz-Almeida
a9dad532ae
Performance improvement in renders
2015-05-11 01:02:17 +02:00
Manu Mtz-Almeida
d6771dc4a5
Cosmetic changes
2015-05-09 03:35:31 +02:00
Manu Mtz-Almeida
2d8f0a4801
Performance improvements when rendering
...
- Fast path for JSON, XML and plain text rendering
2015-05-07 12:44:52 +02:00
Manu Mtz-Almeida
f414648384
- More unit tests
...
- Improves HTML debug render
- InputHolder removed
- More debug logs
2015-05-05 15:06:38 +02:00
Manu Mtz-Almeida
0a192fb0fa
Tons of unit tests
2015-04-09 12:15:02 +02:00