Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

header base auth with HTTPClient connector.

77 views
Skip to first unread message

sathee...@gmail.com

unread,
Sep 3, 2021, 5:32:15 AM9/3/21
to
Hi All,

I'm using the HTTP Connector to make an HTTP GET call. I want to use the direct header base Authorization for all web service transactions incensed of JSON. So do we have any sample code?

in

Eddie Hartman

unread,
Sep 5, 2021, 9:47:35 AM9/5/21
to
You map out attributes starting with 'http.' to create headers, just like you can read in headers that are returned with 'http.*' names.

So if you want to map out Authorization you first make the Attribute name 'http.Authorization'. Then you map the actual value. For example,

--- example mapping code for http.Authorization ---
return "BASIC " + system.base64Encode(String(user + ":" + password).getBytes());
---

This is assuming you have a variable named 'user' with the user id and 'password' with their password.

Does this help?

/Eddie

sathee...@gmail.com

unread,
Sep 7, 2021, 2:02:28 AM9/7/21
to
Thanks Eddie.
0 new messages