Comments (6)
Should be parsed into the form
property, IMHO. data
appears to always be the submitted data in binary form, regardless of type, and I think it should stay that way.
from httpbin.
json-encoded data isn't form data. It's just a set of bytes, as seen here.
from httpbin.
That being said, a json attribute might be in order.
from httpbin.
Maybe something like decode_content
flag that will attempt to decode content based on content type header, which in this case should be application/json?
from httpbin.
I think that would be overkill. A json
attribute makes sense though.
from httpbin.
Looks like this made it in :)
$ http post http://httpbin.org/post key=value
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Connection: keep-alive
Content-Length: 519
Content-Type: application/json
Date: Sun, 22 Jun 2014 21:54:09 GMT
Server: gunicorn/18.0
{
"args": {},
"data": "{\"key\": \"value\"}",
"files": {},
"form": {},
"headers": {
"Accept": "application/json",
"Accept-Encoding": "gzip, deflate",
"Connection": "close",
"Content-Length": "16",
"Content-Type": "application/json; charset=utf-8",
"Host": "httpbin.org",
"User-Agent": "HTTPie/0.8.0",
"X-Request-Id": "37f30462-944c-488c-8c63-d4bc5519e771"
},
"json": {
"key": "value"
},
"origin": "198.15.119.130",
"url": "http://httpbin.org/post"
}
from httpbin.
Related Issues (20)
- Can we check Latency less than 1 second in httpbin
- readme file does not explain what this service does HOT 2
- Question: Is there reason for not using smaller Alpine based python as base image for httpbin HOT 1
- Multipart form with JSON returned as JSON string
- Any plans to updated the SSL certificate? HOT 1
- Include Spec.Json Link
- Digest authentication algorithm parameter not working
- Can't get a response using Set-Cookie header ? HOT 1
- State of Maintenance HOT 24
- If anyone's lookiing for an alternative... HOT 5
- 504 Gateway Time-out http://httpbin.org/ip
- Decode JWT in "Authentication: Bearer ..." request header
- RFE: replace `raven` by `sentry` HOT 1
- RFE: please provide update for `werkzeug` 3.0.x
- A similar project for those who might need
- Allow status requests to ignore trailing path
- /headers Endpoint doesn't show all request headers
- chunked posts not seen in server
- transfer repo back to @kennethreitz HOT 2
- API to test connection timeouts: /conndelay/N
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from httpbin.