Reputation: 163
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
Upvotes: 0
Views: 260
Reputation: 15548
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.
Upvotes: 0