-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Sending multipart/form-data #521
Comments
|
@bruceadams That seems to have done the trick as far as sending as multi-part is concerned, thanks! |
Hmm, can you let Requests set the Content-Type header? It just worked for me, without my setting Content-Type. |
@bruceadams I have done as you suggested (edited original post again) which did correct the content type issue, but it still seems like the files are corrupted. I'm not sure if this is a product of the fact that the files are Jpeg images or that I am on Windows (or both) which is odd since everything appears to be correct now. |
Glad to hear there was at least resolution to the original issue! The corrupted files are not a locust issue as far as I can tell. Seems more like an issue between requests and your server. Discussion is welcome to continue but I'm going to close this issue to keep focus on locust-specific problems. For future debugging, it would be helpful to clarify what you mean by "corrupted." Headers missing? Empty content? Second half missing? One character off? |
I am also facing same issue my image file is getting corrupted.... |
I'm attempting to send a rather simple test to a server that requires post requests to be sent as multipart/form-data, however I am receiving an error when attempting to send the request. Error below:
TypeError: post() takes at most 4 arguments (5 given)
The code written is rather simple and I believe it follows all of locust's requirements, however I am not sure why the error is occurring as my post only has 4 arguments. Code below:
The text was updated successfully, but these errors were encountered: