[Using the Java Bundle version 126.96.36.199]
I want to retrieve data from a REST-resource that requires a valid user to be authenticated using Basic HTTP access authentication. If I use CkRest#SetAuthBasic, like in this code fragment (error handling etc. removed for clarity), a HTTP Status 401 is returned:
Returns: HTTP Status 401
If I explicitly calculate and insert an 'Authorization' header, the request gets authenticated and a result is returned:
Returns: valid data.
We would prefer to use the SetAuthBasic() method, but for some reason this does not work. Can anybody tell me how I should use this method or why this is going wrong?
asked Oct 16 at 10:54
Chilkat will not allow sending Basic Authentication over a non-secure connection. In other words, an SSL/TLS connection is required to send the Basic Authentication, otherwise the login/password is visible for all to see.
However, in this case, I see that it is a connection to localhost, and Chilkat should allow for that exception. I'll make this exception automatic in the next version released (188.8.131.52).
answered Oct 16 at 12:19