Re: Getting 415 Unsupported Media Type error while recording Postman request by Jmeter
Dmitri T <[email protected]> Tue, 23 Apr 2024 06:43:11 +0200
| Newsgroups | gmane.comp.jakarta.jmeter.user |
|---|---|
| Message-ID | <PH7PR12MB7139DB5A314BCC78FEB74482C0112@PH7PR12MB7139.namprd12.prod.outlook.com> |
Nuwan Mudalige wrote: > Hi, > > I have a file upload API call which is working fine on Postman. > > While I am recording that Postman request by Jmeter it is throwing "415 > Unsupported Media Type" error. > > I manually built a Jmeter test following the Postman but still failed with > the same issue. > > Appreciate your expertise support to resolve this issue. > > Thank you! > > - Nuwan > HTTP Status 415 <https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/415> means that you're using wrong HTTP request method <https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods>, i.e. GET instead of POST or something like this. Given your test works in Postman you can record it using JMeter's HTTP(S) Test Script Recorder, at least this way there will be no mess with methods, parameters, etc. If you're uploading a file make sure to copy the file to "bin" folder of your JMeter installation prior to upload. See How to Convert Your Postman API Tests to JMeter for Scaling <https://www.blazemeter.com/blog/convert-postman-api-tests> for more information. You might need to correlate <https://jmeter.apache.org/usermanual/jmeter_proxy_step_by_step.html#correlate-start> any dynamic parameters as well.