Get JSON Data with NTLM authentication
Posted: Sat Jan 05, 2019 4:40 pm
Hello,
I want to put my data JSON into an array. With the integrated library this works well
on sites without login.
How can I use the "URL" command with NTLM Autentication. I need to add header data, but I don't find a
possibility for this?
Is this possible with live code?
Thx Siggi
I want to put my data JSON into an array. With the integrated library this works well
on sites without login.
Code: Select all
set the itemDelimiter to slash
put URL "https://open library. org/api/books?bibkeys=ISBN:0385472579,LCCN:62019420&format=json" into NewsContent
put the result into theError
if theError is empty then
put JSONToArray(NewsContent) into tArray
possibility for this?
Code: Select all
var client = new RestClient("http://srzg023. xxx. local:7048/NAV130-CH-ORIG/api/beta/companies");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "NTLM TlRMTVNTUAADAAAAGAAYAGgAAAAYABgAgAAAAAAAAABIAAAAIAAgAEgAAAAAAAAAaAAAAAAAAACYAAAABYKIogUBKAoAAAAPcwBpAGUAZwBmAHIAaQBlAGQALgBrAGEAcgBsAGUAcgAnpk+rQ3+mqQAAAAAAAAAAAAAAAAAAAACrY7GaUtg0ZZzDkkKuc8YsrwNIGR5tvhc=");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
Thx Siggi