0

I am trying to implement digest authentication using async-http-client on top of swiftNIO. Therefore I use a class which uses the HTTPClientResponseDelegate protocol. In this class in the

func didReceiveHead(task: HTTPClient.Task<Response>, _ head: HTTPResponseHead) -> EventLoopFuture<Void> {

I parse the first server response and I generate the hash for the response. Now I have to construct the Authorization header with my hash, conforming to the digest authentication. But how can I send it to the server again from my class? Must I make a new HTTPClient.Request or I can make a response with an header directly from my class? Perhaps somebody can give me a tip how to achieve this using swiftNIO and async-http-client.

Thanks Arnold

1 Answer 1

0

I’m afraid that at the moment you do need to make a new request from your delegate. Currently there is no way to automatically send a new request.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.