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

net/http: support Content-Type: application/json #2758

Closed
hoisie opened this issue Jan 22, 2012 · 3 comments
Closed

net/http: support Content-Type: application/json #2758

hoisie opened this issue Jan 22, 2012 · 3 comments

Comments

@hoisie
Copy link
Contributor

hoisie commented Jan 22, 2012

Many popular javascript libraries, like jQuery, support sending requests with the
application/json content-type. Some even enable it by default (like backbone.js, link
below ). It would be nice if Go supported parsing requests with this content type. 

http://documentcloud.github.com/backbone/#Sync

Which compiler are you using (5g, 6g, 8g, gccgo)?
6g

Which operating system are you using?
Mac OSX

Which revision are you using?  (hg identify)
c1702f36df03 (release-branch.r60) release/release.r60.3
@rsc
Copy link
Contributor

rsc commented Jan 23, 2012

Comment 1:

It seems like you can check the content-type
and then 
json.NewDecoder(req.Body).Unmarshal(&myData)
no?

Status changed to WaitingForReply.

@rsc
Copy link
Contributor

rsc commented Jan 24, 2012

Comment 2:

Labels changed: added priority-go1, removed priority-triage.

@bradfitz
Copy link
Contributor

Comment 3:

Labels changed: added priority-triage, removed priority-go1.

Status changed to TimedOut.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants