surf
surf copied to clipboard
AddRequestHeader not working
I am trying to do basic auth using authorization header. However, during URL request surf is not attaching the header with the request. I did following:
browser.AddRequestHeader("Authorization","Basic "+base64encodedstring)
browser.Open(url)
browser.StatusCode() //throwing 401
@headzoo Could you provide some insight? How could we login into a website requesting basic auth?
@anisbhsl Did you manage to figure it out?
@s0kil I had to make custom changes in this library to make it work. You need to intercept the request maker (though need to hardcode authorization token there), but I managed to solve it that way.
My problem was that I was trying to use basic auth to login, but the server wants digest authentication.