How to send base64 file content as Body in HTTP post request

Hi everyone, Can anyone help me how can i do a Post request in HTTP with Base64 file content in Body.
Initially i’m trying this in Postman but it is throwing me an error.

Format which i’m using in HTTP Body

{

“fileName”: “my file name”,

“urlSource”: “Base64FileContent Variable”

}

I’m getting below error.

{

“error”: {

"code": "InvalidArgument",

"message": "Invalid argument.",

"innererror": {

  "code": "ParameterMissing",

  "message": "The parameter urlSource or base64Source is required."

}

}

}

in general we do have the following cascade:

  • test it with POSTMAN
  • check the consumed REST API Doku

Related to HTTP REQUEST

Let us know the track and result of the above mentioned steps

Hi @ppr , i’m trying to POST my base64 pdf file content using postman body but it is not accepting. it is throwing me an error.

Below format i used

{
“fileName”: “my filename given”
“fileContents”: base64 content pasted here
}

Ok, fine so far.
We learned that is preferrable to gest REST API calls working in POSTMAN especially when difficulties are encountered with HTTP REQUEST

“fileContents”: base64 content pasted here

maybe you can use a POSTMAN variable

Keep in mind, we also do lack on details (which api, what in detail was done…) so we can only give general suggestions

@ppr , i’m sending my pdf based64 content to Azure form recognizer. I have files in sharepoint. I’m unable to share the link in postman due to access issue. so i’m tring to send my file Base64 content there.

issue is resolved,i made a mistake in body and it is fixed. Thanks for the replies.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.