Issue with custom Content Type

Not applicable

hi, I am facing issue with custom Content-Type header to use in request. When I am using application/vd.xxx+json in the request then I am getting error in AssignMessage policy with the request payload however it is working fine if I am using "application/json" content type. Is custom content type is not supported in Apigeeor there is any special way to handle them?

0 5 578
5 REPLIES 5

sudheendras
Staff

What error do you see? Can you please share more details?

0 1 1

Error is "unresolved variable: xxx.to" It is coming for request variable extracting in assign message policy but same is working fine when content-type is "application/json"

0 0 1

sudheendras
Staff

Hi @Waqar Syed According to the doc, JSON extraction is performed only when message's Content-type is application/json. But you could either change the content type or use a JavaScript policy to extract the value.

0 2 1

Thanks I used JS policy instead to modify the json payload and it fixed the issue.

0 0 1

Hi,

If we use Source as "“request.content”" in the Extract Variables policy then we are able to use custom content-type in request without making a JS call. Is it something fixed in Apigee and document not updated?

0 0 1
Top Labels in this Space
Top Solution Authors