Comments (7)
It would be nice to have an <input type="file">
on http://httpbin.org/forms/post, so that we can easily test the file upload from a form.
from httpbin.
You can actually upload files to the /post
endpoint. The file will show up under the "files" attribute, and you can call len() on that to get the size.
$ curl -F [email protected] http://httpbin.org/post
{
"args": {},
"data": "",
"files": {
"filedata": "test file\n"
},
"form": {},
"headers": {
"Accept": "*/*",
"Connection": "close",
"Content-Length": "204",
"Content-Type": "multipart/form-data; boundary=----------------------------6f3090fec3a4",
"Host": "httpbin.org",
"User-Agent": "curl/7.30.0",
"X-Request-Id": "a6a6fbb4-a8aa-4d60-8918-c3591ea2ab35"
},
"json": null,
"origin": "198.15.98.58",
"url": "http://httpbin.org/post"
That said, we could make this friendlier possibly. @kennethreitz can you weigh in on this?
from httpbin.
Hi there. Any progress here?
from httpbin.
Since this already exists, I'm inclined to close this unless there is some further clarification on why this needs to differ from /post
.
from httpbin.
This is indeed what /post
was intended for.
from httpbin.
no test upload?
from httpbin.
This assumes that the upload content type is a standard multipart/form-data
or application/x-www-form-urlencoded
. What if you are trying to upload all sorts of stuff like application/x-tar
... etc?
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 7
- 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.