Add file with key as post parameter
See original GitHub issueI have POST API with some parameters like :
first_name
(String)last_name
(String)avatar_image
(File)
I can add first_name
and last_name
to request body using addBodyParameter()
.
But for avatar_image
, I don’t know how to add a file.
I need to add file as post parameter with key avatar_image
along with other parameters.
How can I do that?
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
How to upload file to server with HTTP POST multipart/form ...
My web service needed one file (POST parameter name was "file") & a string value ... GetRequestStream(); foreach (string key in values.
Read more >Upload Any File Using HTTP Post Multipart Form Data
In this article, we will discuss how to upload any file using HTTP Post multipart/form-data in C#. I have tried my best to...
Read more >Multipart Form Post in C# - Brian Grinstead
Here is the code to call the MultipartFormDataPost function with multiple parameters, including a file. // Read file data FileStream fs = new...
Read more >File Add Multipart POST - Constant Contact Developer
The POST method adds a file to a Library folder using the multipart form content-type. If there are no folders in the account,...
Read more >POST form-data file upload + JSON - YouTube
Postman allows you to submit a form- data request where in one key you send a file and in the other key you...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks @amitshekhariitbhu You’re right. That issue is from body level logging. Now I can post successfully.
@JanakBca1992 Please refer this https://github.com/amitshekhariitbhu/Fast-Android-Networking/issues/106