Hi, On Tue, May 8, 2012 at 10:54 AM, Günther Schmidt <[email protected]> wrote: > ...I'm trying to create a directory using Apaches HTTP components HTTPClient. > > I've tried for a couple of days now to figure out how authentication is > meant to be used but keep getting Access Denied Errors....
Our HttpTestBase [1] class includes code to setup httpclient 3.x to use credentials, you could use that as an example. I haven't looked in detail but you might just be missing the setAuthenticationPreemptive option. Note also that the testing tools module at [2] includes a simplified fluent interface to HTTPClient (4.x) which can be useful for such things. See [3] for usage examples. -Bertrand [1] http://svn.apache.org/repos/asf/sling/trunk/bundles/commons/testing/src/main/java/org/apache/sling/commons/testing/integration/HttpTestBase.java [2] https://svn.apache.org/repos/asf/sling/trunk/testing/tools/ [3] https://svn.apache.org/repos/asf/sling/trunk/testing/samples/integration-tests/
