Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] Http Headers not getting set in TRESTClient Put method call

Hello,
I am trying to set the headers for a put method call through tRESTClient but i am getting the same error message of
"errors":,"message":"Expecting Accept=application/vnd.mediaocean.mdm-v1+json"}]}
Attaching the screen shots here.
0683p000009MAnb.png              
0683p000009MAlL.png
0683p000009MAth.png
Here the request shows accept header as the value that i have set, but the response code shows content-type with that value.
Also, the PREAUTH_USER_ID header doesnt get passed at all in the response.
how can this be rectified? somewhere during the request sent to the tRESTClient, the content-type is getting overridden with the Accept header value! Is there a workaround for this?
Please help me with this issue.
I am stuck on this for too long.
Any help will be appreciated.
Thank you.
Labels (4)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi
I can see tRESTClient actually producing a correct set of headers, including your custom header. Accept header is not optimal, it has 3 values, a wildcard and your content type (Accept with multiple values is valid), but unfortunately the server is not able to accept such a header, even though your custom media type has an obvious precedence over a wildcard.
The problem is that tRESTClient accumulates Accept header values, which is generally OK. In your case you have Accept set to 'any' and also set in the advanced properties, perhaps we should support the overriding mode.
See https://jira.talendforge.org/browse/TESB-10554
Cheers, Sergey

View solution in original post

1 Reply
Anonymous
Not applicable
Author

Hi
I can see tRESTClient actually producing a correct set of headers, including your custom header. Accept header is not optimal, it has 3 values, a wildcard and your content type (Accept with multiple values is valid), but unfortunately the server is not able to accept such a header, even though your custom media type has an obvious precedence over a wildcard.
The problem is that tRESTClient accumulates Accept header values, which is generally OK. In your case you have Accept set to 'any' and also set in the advanced properties, perhaps we should support the overriding mode.
See https://jira.talendforge.org/browse/TESB-10554
Cheers, Sergey