Showing results for 
Search instead for 
Did you mean: 

Utility - HTTP Request Multipart - Content-Type Bug(?)

I successfully made a call using "HTTP Request Multipart" action from "Utility - HTTP" VBO,
HOWEVER, I was able to do so only after my slight change to the code stage.
I wonder if it is a small bug or I was not able to implement it as it was supposed to.
Alongside a file I need to send a message. It has Json format so I need this part to have a "application/json" Content-Type. This action doesnt allow me to specify Content-Type for this part of the request.
I get a "415 UNSUPPORTED_MEDIA_TYPE "Content type 'application/octet-stream' not supported for(...)

When I do not send a file I am able to observe in fiddler that it does get send without any content type and then probably assumes "octet-stream".
I resolved it by simply adding this to code:
35454.pngbut I wonder if maybe I am missing some other, "built in" way to address it.

@Dominika Zolotarew

Thanks for pointing this out. You are right that the current version doesn't allow setting the Content-Type explicitly for FieldMetadata. It would be worth adding this as a parameter to offer more flexibility to the action. I will include this change in the action shortly and publish a new version on DX shortly.

That's terrific, thank you!
I would be grateful for info once it's done, but I will of course monitor DX as well.

Have a good day!

@Dominika Zolotarew

New version 10.0.1 has been posted on DX to support setting Content Type for FieldMetadata. Let us know if it resolves your issue.