Header value being truncated when using <data>
Posted: Tue Aug 28, 2018 11:06 am
Hi Support Team,
I need your help re: the following code segment:
<log>
<value expr="header_str"/>
</log>
<data name="resp_nearest" src="{{appURL('api/v1/schedule')}}" accept="application/json" method="raw"
enctype="application/json"
headersexpr="header_str" rawexpr="getNearestVisitString(orgid, caregiver.cid)"/>
Here's the issue I'm experiencing:
Thanks,
Scott Moser
I need your help re: the following code segment:
<log>
<value expr="header_str"/>
</log>
<data name="resp_nearest" src="{{appURL('api/v1/schedule')}}" accept="application/json" method="raw"
enctype="application/json"
headersexpr="header_str" rawexpr="getNearestVisitString(orgid, caregiver.cid)"/>
Here's the issue I'm experiencing:
- - I log the value of header_str and can see that it is set correctly (it happens to be an "Authorization: Bearer <token>" header with token that is 340 characters in length) immediately before its use in the <data> tag.
- When I call my URL using the <data> tag, the request gets to my server correctly with the "Authorization: Bearer <token>" header included. However, the token has been truncated to 105 characters so my request fails authentication.
Thanks,
Scott Moser