Setting content type for HttpPost(url, body)

Hi,

My goal is to make a call to an external rest endpoint in reaction to an Orthanc related event.

I was able to get the example provided working (where on the event OnStoredInstance, a post call goes against the example node.js service).

However, when I adapt it to my own rest endpoint, I get HTTP 415, Unsupported Content Type.

Is there a way for me to set the request header for the generic HTTP Request methods as provided by the Lua engine of Orthanc?

Thanks!!
Srey Seng

Hello,

It is currently not possible to add HTTP headers when using the HttpGet(), HttpPost(), HttpPut() and HttpDelete() family of Lua functions.

I have introduced a card on the backlog:
https://trello.com/c/eQZelO9M

Sébastien-

Ok, that’s great to know it’s not currently possible at this time (but will be!).

Thanks!!
Srey Seng