http-client update

4 views
Skip to first unread message

Tom Robinson

unread,
Nov 3, 2010, 3:47:23 PM11/3/10
to narw...@googlegroups.com
I've updated the http-client module. This fixes the Github HTTPS redirect problem in tusk, etc. It *should* be backwards compatible, but let me know if you have problems.

Both the Rhino and JavaScriptCore versions should now be roughly equivalent in features. Also let me know if you notice and differences between the two.


HTTP.open(url, mode, options)

"url": obvious
"mode": not yet supported ("b" for binary stream is the default and only way to use http-client currently)
"options":
"method" string for the HTTP method
"headers" object for the HTTP request headers
"followsRedirects" (defaults to true)

The object returned by "open" is still an IO stream that also will have the HTTP data attached:

"status" and "statusText" for the HTTP response code and status text
"headers" object for the HTTP response headers

Both support requests with a body too. Just write to the stream before the first time you read from it. After you read the response you can no longer write the request, of course.

I removed the old HttpClient from Isaac. Hopefully no one is still using it. If you are you can just copy the old version of the module to your project and use it directly.

-tom

Kris Kowal

unread,
Nov 4, 2010, 12:30:21 AM11/4/10
to narw...@googlegroups.com
On Wed, Nov 3, 2010 at 12:47 PM, Tom Robinson <tlrob...@gmail.com> wrote:
> I've updated the http-client module. This fixes the Github HTTPS redirect problem in tusk, etc. It *should* be backwards compatible, but let me know if you have problems.

Neat. Thanks for taking care of this.

Kris Kowal

Christoph Dorn

unread,
Nov 4, 2010, 12:45:22 PM11/4/10
to narw...@googlegroups.com

I am totally out of sync right now, but will check once I get cleaned
up. Working on using nodules instead of my require2 implementation by
adding catalog and other support to nodules.

Christoph

Reply all
Reply to author
Forward
0 new messages