Unsupported Media Type

I am having issues with running a collection data file.

my data file contains this exact code, and is called orders.json

when i try to run a collection with my json post request i get an unsupported media type error. but if i copy what is inside of the json file and run it in my request it runs fine.

Hi @cryosat-technologist,

Welcome to the community :bouquet:

Can you share some screenshots here?

Are you trying to pass the file as binary into the body?

here are the screen shots of what I’m trying to do

You are trying to pass this as a data file and have you declared the data variables accordingly? Because from the previous message I understood that you are trying to pass this JSON as the entire body for the POST request? If so why are you passing the file here?

Can you please provide some insights here?

i am trying to pass a data file and i have declared the variables as seen above. when i try to pass the file it says the file is an unsupported media type. but the file is a .json and the information in the file is json. and when i just put the contents of the file inside of the body of the request the request takes the information fine

Okay I get that, I used the same file for Postman echo collection. It is working as expected. And Can you please check the headers you have added? Probably something wrong there. If there’s something wrong with the JSON file you will getting different error something related to parsing the file. Possibly share the header screenshot, else try to verify against the spec.


this is the properties of the orders file and how it looks in the runner

Hello @cryosat-technologist, I am talking about the headers :slight_smile:

here you go!