Closed GoogleCodeExporter closed 8 years ago
It only adds the header when challenged for authentication by the server. If
you want to force it to add the header you need to use preemptive basic auth.
E.g.
given().auth().preemptive().basic("x", "y"). ..
or
RestAssured.authentication = preemptive().basic("x", "y"). ..
This will add the correct headers to the request even though the server has
never challenged.
Original comment by johan.ha...@gmail.com
on 2 Aug 2011 at 5:43
i spent hours trying to get basic auth to work. Thanks to this post on
preemptive and my determination, I was able to solve the problem.
Original comment by neali...@gmail.com
on 15 Jul 2014 at 5:32
Great this topic save me time investigation what's wrong with basic auth.
Original comment by TomasLuc...@gmail.com
on 6 Jan 2015 at 10:11
Original issue reported on code.google.com by
tyler.sc...@gmail.com
on 25 Jul 2011 at 8:49