Making http calls with Ratpack's HttpClient.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Making http calls with Ratpack's HttpClient.

uris77
I was looking at the example-books repo and saw this line https://github.com/ratpack/example-books/blob/master/src%2Fmain%2Fgroovy%2Fratpack%2Fexample%2Fbooks%2FIsbnDbCommands.groovy#L32 :

 request.url.set("http://isbndb.com/api/v2/json/${launchConfig.getOther('isbndb.apikey', '')}/book/$isbn".toURI())


If I understand correctly, RequestSpec.url returns a java.net.URI ; but there is no 'set' method on URI? Maybe I was looking at the wrong code (for RequestSpec)?
rus
Reply | Threaded
Open this post in threaded view
|

Re: Making http calls with Ratpack's HttpClient.

rus
Yeah I think thats wrong, good spot.  It probably isn't working and hitting the fallback.  Will fix it up.