News for hackers. Stuff that matters.
Re:Requests: HTTP for Humans by anoopks on Sunday August 14, 2011 @03:04AM (#2883008)
Does anyone know of such an API in Java - HTTP for Humans in Java?
Re:Requests: HTTP for Humans by ollysb on Sunday August 14, 2011 @06:34AM (#2883328)
Restlet is a good attempt at writing an api that matches the http spec well. You can find docs for a client at http://wiki.restlet.org/docs_2.1/13-restlet/21-restlet/318-r.... It's still more verbose than it might be, would be a good starting point for writing a decent api though.
Re:Requests: HTTP for Humans by nl on Sunday August 14, 2011 @09:30PM (#2885058)
Restlet is a server framework.

I think the parent poster is looking for a client API that is nicer to use than java.net.Url and/or the various versions of HTTPClient

Re:Requests: HTTP for Humans by ollysb on Monday August 15, 2011 @09:54AM (#2886884)
From the restlet home page "Do you want to blend your web services, web sites and web clients into unified web applications exposing and consuming RESTful web APIs?"

The link I provided was to an example of using restlet on the client side. I would agree that the api is not as human friendly as it could be but it does describe interactions in a restful which is why I suggested it would be a good starting point for writing a friendly api.

Re:Requests: HTTP for Humans by deno on Sunday August 14, 2011 @11:19PM (#2885311)
Jetty's HTTP client is pretty decent.

http://wiki.eclipse.org/Jetty/Tutorial/HttpClient