You need to sign in to do that
Don't have an account?
Test Dev 81
STATUS 415 Unsupported Media Type while uploading text file using postman
hi everyone,
I want to upload the file using apex but before do that I am testing callout by the postman
but I am getting error while making a POST request
do you have any idea what I am doing wrong here
thanks,
Rahul
I want to upload the file using apex but before do that I am testing callout by the postman
but I am getting error while making a POST request
do you have any idea what I am doing wrong here
thanks,
Rahul
Yor are using the wrong Content-Type in Postman, it should be multipart/form-data instead of text/plain.
To Post the file with Apex Code see the following example:
Post File with Apex (https://gist.github.com/jovabe/e072545671c047243f0e2c80f8d137b4)
please mark as the best answer of this help you.
regards,
Omar
DEBUG|res: "No files received."
reference: https://docparser.com/blog/post-file-salesforce-apex-external-http-webservices/
Regards,
Omar
Now I am getting an error
regards,
Omar