question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add file with key as post parameter

See original GitHub issue

I 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:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
coldpinguincommented, Apr 16, 2017

Thanks @amitshekhariitbhu You’re right. That issue is from body level logging. Now I can post successfully.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found