Is there a way to set new content -type for Rest connector ?

I have rest service which uses following headers.

"Accept: application/yang-data+json" and "Content-Type: application/yang-data+jsonl"

 

When I connect to my service using Bonita Rest connnector , I get following error in log:

2022-03-14 12:17:16.085 +0100 WARNING: org.bonitasoft.connectors.rest.RESTConnector Body as map output cannot be set. Response content type is not json compliant(application/yang-data+json).

 

So I want to know, Is there a way to set new content -type and Accept while creating Rest Connector ? I tried setting parameter for these headers under "set additional information - headers", but this didnt work, it still gives same error.

Hi,

2022-03-14 12:17:16.085 +0100 WARNING: org.bonitasoft.connectors.rest.RESTConnector Body as map output cannot be set. Response content type is not json compliant(application/yang-data+json).

This WARNING just explained that the connector output named bodyAsObject won’t be generated as it only supports application/json response Content-Type.

It doesn’t mean that the request failed, and the result can still be retrieved as a plain String in the bodyAsString connector output.

HTH
Romain

HI Romain,

Yes, I figured this later. And we can also set new headers or overwrite headers by defining in the next steps after setting url