Preemptive Basic auth with Apache HttpClient 5.2

2023-07-13 Thread D'Ascola, Giovanni
Is there a way to implement preemptive basic authentication with Apache HttpClient 5.2 using a HttpRequestInterceptor similar to how it's done here (accepted response) for Apache HttpClient

Re: Preemptive Basic auth with Apache HttpClient 5.2

2023-07-13 Thread Oleg Kalnichevski
On Thu, 2023-07-13 at 15:27 +, D'Ascola, Giovanni wrote: >  Is there a way to implement preemptive basic authentication with > Apache HttpClient 5.2 using a HttpRequestInterceptor similar to how > it's done here (accepted > response)

Re: Preemptive Basic auth with Apache HttpClient 5.2

2023-07-13 Thread D'Ascola, Giovanni
I did look at the examples, but the Preemptive Basic Auth one requires to manually create and configure a context and pass it to the

Re: Preemptive Basic auth with Apache HttpClient 5.2

2023-07-13 Thread D'Ascola, Giovanni
I did, but what I tried didn’t work. I’ve put the code in my original email. I ended up manually adding the Authorization header to the request in the same interceptor. It works, but it’s not very nice, I’d rather let the framework take care of that. From: Oleg Kalnichevski Date: Thursday, 13

Re: Preemptive Basic auth with Apache HttpClient 5.2

2023-07-13 Thread Oleg Kalnichevski
On Thu, 2023-07-13 at 17:02 +, D'Ascola, Giovanni wrote: > I did look at the examples, but the Preemptive Basic Auth > one lient5/src/test/java/org/apache/hc/client5/http/examples/ClientPreemp > tiveBasicAuthentication.java>