Skip to content

Develop - 强化Bind能力,新增PostValues接口,更正Readme部分文字描述#96

Merged
devfeel merged 2 commits intomasterfrom
develop
Dec 29, 2017
Merged

Develop - 强化Bind能力,新增PostValues接口,更正Readme部分文字描述#96
devfeel merged 2 commits intomasterfrom
develop

Conversation

@devfeel
Copy link
Owner

@devfeel devfeel commented Dec 29, 2017

Version 1.4.0

  • 强化Bind能力,添加BindJsonBody接口,不对Content-Type进行判定,直接获取req.Body进行json序列化
  • 基础Bind机制:
    1)如果识别到Content-Type = application/json 会尝试使用json序列化到struct
    2)如果识别到Content-Type = application/xml 会尝试使用xml序列化到struct
    3)非以上类型,会默认识别form的key/value模式匹配
  • Context.Request()新增PostValues接口,包含 POST, PATCH, or PUT请求集合,以map[string][]string返回
  • 更正Readme部分文字描述
  • 完善example/bind
  • 2017-12-29 16:00:00

update example code
* 强化Bind能力,添加BindJsonBody接口,不对Content-Type进行判定,直接获取req.Body进行json序列化
* 基础Bind机制:
 1)如果识别到Content-Type = application/json  会尝试使用json序列化到struct
 2)如果识别到Content-Type = application/xml  会尝试使用xml序列化到struct
 3)非以上类型,会默认识别form的key/value模式匹配
* Context.Request()新增PostValues接口,包含 POST, PATCH, or PUT请求集合,以map[string][]string返回
* 更正Readme部分文字描述
* 完善example/bind
* 2017-12-29 16:00:00
@devfeel devfeel merged commit d4e05e6 into master Dec 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant