From 69589ac67d936db9fc675ab8c48e1655a2dc40dd Mon Sep 17 00:00:00 2001 From: PASSERON Jeremy Date: Tue, 7 Mar 2017 15:16:19 +0100 Subject: [PATCH] Add a basic Authentication example to README --- README.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.rst b/README.rst index 9479f1b..acc8247 100644 --- a/README.rst +++ b/README.rst @@ -136,6 +136,12 @@ JSON Sample for paths above:: json(path("workflows")).json(path("current")).json(path("levels[displayName='Incoming'].href")). json(path("ruleSets[1].EngageRouting")).object(); +*Authenticate on a server with BasicAuth*:: + + Resty resty = new Resty(); + resty.authenticate("http://my.server.with.auth", "username", "password".toCharArray()); + TextResource text = resty.text("http://my.server.with.auth/aResource"); + Developers ===========