+1 for static methods. Not sure about the implications of the rest yet.

Allen Madsen
http://www.allenmadsen.com


On Tue, Dec 29, 2009 at 7:13 AM, Joran Greef <jorangr...@gmail.com> wrote:

> Propose:
>
> Http.get(uri, options) and Http.post(uri, options).
>
> Where:
>
> options = {
>  headers: {},
>  parameters: {},
>  body: '',
>  onSuccess: function(response) {},
>  onFailure: function(response) {},
>  onTimeout: function(response) {}
> }
>
> And:
>
> response = {
>  status: Integer,
>  headers: {},
>  body: ''
> }
>
> Static methods: 'Http.get(uri, options)' as opposed to 'new Http.Get
> (uri, options)'. The developer must explicitly set 'X-HTTP-Method-
> Override' header or '_method' parameters or whatever he or she wants
> to use to signal an unsupported method such as 'PUT' and
> 'DELETE' (depending on the capability of the server). The developer
> must explicitly parse response.body. The Http object must be merely a
> cross-browser wrapper for XMLHttpRequest and must not take on too much
> responsibility or make assumptions on behalf of the developer, e.g.
> with respect to JSON parsing etc.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Prototype: Core" group.
> To post to this group, send email to prototype-core@googlegroups.com
> To unsubscribe from this group, send email to
> prototype-core-unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/prototype-core?hl=en
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to 
prototype-core-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en

Reply via email to