Something went wrong while trying to load the full version of this site. Try hard-refreshing this page to fix the error.

Content-Type Limitation with PATCH Requests in AwareIM

Pomegranate

Hi guys,

I'm currently working on a project that involves integrating with Vimeo's tus API for video uploads. The issue I'm running into is related to the Content-Type header. The Vimeo API expects a specific Content-Type of application/offset+octet-stream for the PATCH request used in the upload process.

However, in AwareIM, when configuring an HTTP request, I see that the only available Content-Type options are generic types like application/octet-stream, application/json, and similar. There is no option to set it to application/offset+octet-stream, which is causing the upload request to fail since the exact Content-Type is required by the Vimeo API.

I tried setting up the PATCH request manually in Postman, and it works fine when I use application/offset+octet-stream. But in AwareIM, it doesn't seem like I can specify this exact type due to the limited dropdown list available in the content type configuration.

Has anyone else faced this issue or found a workaround for specifying a custom Content-Type in AwareIM? Any insights or suggestions would be greatly appreciated.

Thanks in advance for your help!

Best,
Khosbayar


joben

Which version are you running?

I am able to specify my own HTTP headers in AwareIM v 8.8

contenttypes.png


Jaymer

khos , add your own header
IMG_0468.jpeg


BobK

I agree with the suggestion to add a new header, but the issue is (at least in the latest build 3280), the 'Request Body Details' contains a field for the 'content type' and the supplied drop down does not include the required value (see picture below).

What would happen if the 'content type' was defined in both places with different values? I have no idea.

ContentType.png


Jaymer

“ What would happen if the 'content type' was defined in both places with different values? ”

Good Q. Easily checked if you examine incoming headers somewhere …
Or be a Vlad answer.
Certainly he could check the code.
And if both are sent, should be a way to conditionally go one way or the other.


BobK

I actually ran into a similar situation as this and did some testing.

The content-type defined in the 'Request HTTP Headers' is what is sent in the headers to the receiving server.

The content-type defined in the 'Request body' is used by AwareIM to determine how to format the data being sent.


Jaymer

So he should be able to add his own header as in Joachim’s reply.


BobK

Jaymer wrote

So he should be able to add his own header as in Joachim’s reply.

Yes, he should be able to add his own header.