Same cUrl but error only in web postman not in app

why if i import the same curl in Postman application it works but in the web there is a media type error?

When i use Postman application there are no problem and i recived status 201 and in Postman Web, with the same curl, i have an error?

I tried to change many value of content-type but i have always the same problem!


Can you post the headers?

of course…

Can you show the console log to see what was actually sent.

On face value it looks like you are missing the content type, which should be application\json. (It might be one of the hidden headers though, can you expand that section or show the console log to see if the content type is included.

Not sure why it would work in the desktop app, but not the web app though. I would expect it to fail in the same place.

For example.


that’s right! it’s very strange … but I confirm that the web commands are the same as the application … I tried to change the content-type but with no results

this is the imported curl in both environments:

curl -H “Content-Type: multipart/form-data” -H “X-Token: ” -F payloadSend=“{ "alias": "", "startDate": null, "endDate": null, "period": null, "recurrencesNumber": null, "recurrencesInterval": null, "validityPeriod": null, "sentNotify": false, "deliveredNotify": false, "msisdnToNotify": null,"sr": false, "campaignChannel": { "channelName": "UCP", "zone": null, "zoneType": null, "collectionTime": null }, "campaignMessage": {
"messageType": null, "messageContent": "", "template": null, "file": "string", "msisdn": "", "listMsisdn": null, "fileMsisdn": "null", "name": null, "surname": null, "extra": null, "status": "string", "delivered": "string" } };type=application/json” “” --trace-ascii -

It will be something to do with the content type and the body. They need to match.

I haven’t worked with multipart/form-data so I don’t know what that should actually look like.

I assume it can be a mix of types, including JSON.

The curl request shows multipart/form-data but your request headers are showing application/json. Your payload does look like its JSON. I’m wondering if you need to change the content-type back to multipark/form-data. At the moment, they are being auto-generated. You should be able to add your own entry for Content-Type.