Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support map as query string or post form parameters #1383

Merged
merged 8 commits into from Aug 6, 2018
Merged

Support map as query string or post form parameters #1383

merged 8 commits into from Aug 6, 2018

Conversation

thinkerou
Copy link
Member

@thinkerou thinkerou commented Jun 6, 2018

ref: #1362 #1106

please @javierprovecho @appleboy review the idea, thanks!

when use the following curl command:

curl -X POST 'http://localhost:8888/post?ids\[a\]=1234&ids\[b\]=hello&ids\[c\]=3.14'

and use c.QueryMap("ids") will return the following result:

ids: map[c:3.14 a:1234 b:hello]
  • Add query map for post form
  • Add unit test
  • Add document
  • Support post form map for go1.6

@codecov
Copy link

codecov bot commented Jun 6, 2018

Codecov Report

Merging #1383 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1383      +/-   ##
==========================================
+ Coverage   98.01%   98.03%   +0.02%     
==========================================
  Files          36       36              
  Lines        1861     1886      +25     
==========================================
+ Hits         1824     1849      +25     
  Misses         30       30              
  Partials        7        7
Impacted Files Coverage Δ
context.go 96.38% <100%> (+0.24%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 631cfbd...50272ae. Read the comment docs.

@thinkerou thinkerou changed the title [WIP] Support query map Support map as query string or post form parameters Jun 6, 2018
@appleboy appleboy added this to the 1.3 milestone Aug 6, 2018
@appleboy appleboy merged commit 647535c into gin-gonic:master Aug 6, 2018
@thinkerou thinkerou deleted the support-query-map branch August 14, 2018 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants