# Same cUrl but error only in web postman not in app

**URL:** <https://community.postman.com/t/same-curl-but-error-only-in-web-postman-not-in-app/38627>\
**Category:** Help Hub\
**Created:** [August 27, 2022, 2:11pm UTC](https://community.postman.com/t/same-curl-but-error-only-in-web-postman-not-in-app/38627 "2022-08-27T14:11:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![max.tosi](https://avatars.discourse-cdn.com/v4/letter/m/4da419/32.png) [@max.tosi](https://community.postman.com/u/max.tosi)\
**Post date:** [August 27, 2022, 2:11pm UTC](https://community.postman.com/t/same-curl-but-error-only-in-web-postman-not-in-app/38627/1 "2022-08-27T14:11:16Z")

</div>

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

 ![image](https://us1.discourse-cdn.com/getpostman/original/2X/4/4c9e6264fa75171c2e08cefe36c7fe98a893a150.png)

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!

Thanks

---

<div class="post-metadata">

**Author:** ![michaelderekjones](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/michaelderekjones/32/14819_2.png) [@michaelderekjones](https://community.postman.com/u/michaelderekjones)\
**Post date:** [August 30, 2022, 10:44am UTC](https://community.postman.com/t/same-curl-but-error-only-in-web-postman-not-in-app/38627/2 "2022-08-30T10:44:13Z")

</div>

Can you post the headers?

---

<div class="post-metadata">

**Author:** ![max.tosi](https://avatars.discourse-cdn.com/v4/letter/m/4da419/32.png) [@max.tosi](https://community.postman.com/u/max.tosi)\
**Post date:** [August 30, 2022, 12:21pm UTC](https://community.postman.com/t/same-curl-but-error-only-in-web-postman-not-in-app/38627/3 "2022-08-30T12:21:20Z")

</div>

of course…

 ![image](https://us1.discourse-cdn.com/getpostman/original/2X/d/dfba020339ff8ac51e9c205e089bb4cfa331ea69.png)

---

<div class="post-metadata">

**Author:** ![michaelderekjones](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/michaelderekjones/32/14819_2.png) [@michaelderekjones](https://community.postman.com/u/michaelderekjones)\
**Post date:** [August 30, 2022, 12:40pm UTC](https://community.postman.com/t/same-curl-but-error-only-in-web-postman-not-in-app/38627/4 "2022-08-30T12:40:02Z")

</div>

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.

![image](https://us1.discourse-cdn.com/getpostman/original/2X/3/375b5aa83b2d52a69cf5c6d7d2dbbe8a6ca44d42.png)

---

<div class="post-metadata">

**Author:** ![max.tosi](https://avatars.discourse-cdn.com/v4/letter/m/4da419/32.png) [@max.tosi](https://community.postman.com/u/max.tosi)\
**Post date:** [August 30, 2022, 12:50pm UTC](https://community.postman.com/t/same-curl-but-error-only-in-web-postman-not-in-app/38627/6 "2022-08-30T12:50:33Z")

</div>

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

 ![image](https://us1.discourse-cdn.com/getpostman/original/2X/7/769d82aaf8e15994a397a7a4182337bfbc69a558.png)

 ![image](https://us1.discourse-cdn.com/getpostman/original/2X/5/5b3762f6db122af1345d37674399207332c5624e.png)

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” “[https://channel-ssc.api.services.smb.telecomitalia.it/channels/UCP/campaigns?destination=msisdn&message=static&delivery=immediate&type=single&mode=fast](https://channel-ssc.api.services.smb.telecomitalia.it/channels/UCP/campaigns?destination=msisdn&message=static&delivery=immediate&type=single&mode=fast)” --trace-ascii -

---

<div class="post-metadata">

**Author:** ![michaelderekjones](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/michaelderekjones/32/14819_2.png) [@michaelderekjones](https://community.postman.com/u/michaelderekjones)\
**Post date:** [August 30, 2022, 1:16pm UTC](https://community.postman.com/t/same-curl-but-error-only-in-web-postman-not-in-app/38627/7 "2022-08-30T13:16:09Z")

</div>

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.
