Workflow REST Resource Custom Headers

I posted a reply to this old thread here, but felt it warrants it's own post since I am stuck and have to do HTML parsing as a result.

I wanted to use this header, as shown in microsoft's docs, so that I can get the messages as plain text.

As seen here, this is not allowed since ReTool now has a list of headers that we are allowed to use :frowning:

Hi @khill-fbmc,

What if you try setting the header like this?


1 Like

Wow... Thank you!

So was I misinterpreting their docs or are their docs unclear that is how you should do it?

Definitely confusing - it clicked for me when I read further down the page, at example 3 in the JavaScript version of the code:

The fact the header is "prefer" and everything else is the value is definitely unclear. Glad this worked though!

1 Like

ya that could def be worded better... putting the header name for the response in the description for the request headers is just annoying :sweat_smile:

for future readers still confused, according to the table the request contains a header named Prefer of type string with a value of text or html. when the request contains this header the response will have a header named Preference-Applied of unknown type and unknown value (this just means if the header contains this key then the server accepted your request header

ah yes! much more obvious there, heh! :slight_smile:

close, but the value needs to be outlook.body-content-type=text and that finally worked for me.


EDIT: It seems that the quoting is optional, as I see I left mine unquoted and it still worked

1 Like

:rofl: :joy: I was reading that carefully word by word and I still got it wrong. :man_shrugging: instead of the techy coders who made it, all major official API docs should need to be approved by english majors, at least 1 child (min working age lol) and 1 elderly (85+) before public release :clown_face: