Hi,
I'm tying to make a post request to an API which accepts only Windows authentication. I'm not sure (and couldn't find anything helpful online) how to do it in a groovy script.
I have an issue listener where I'll be posting the comment (whenever a new comment is added to the issue) to a different application using an api call. This api call is based on NTLM authentication.
Any idea how this can be done ?
Below is a sample code for the same in C#
var uri = new Uri(baseURL+ "xyz");
using (var wc = new WebClient())
{
wc.UseDefaultCredentials = true;
wc.Headers.Set("Content-Type", "application/json");
var res = wc.UploadString(uri, "POST", json);
return wc.ResponseHeaders.Get("ABC");
}
So, basically I want to implement the wc.UseDefaultCredentials = true part in groovy.
Thanks,
Neha
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.