Form parameters in PUT?

5 views
Skip to first unread message

schickm

unread,
Sep 25, 2008, 12:53:38 PM9/25/08
to AS3 HttpClient
I noticed that the Post class accepts an array of form parameters in
the constructor but not the Put class, is there any reason why this
is? To the best of my limited knowledge form parameters are still
kosher for PUTs according to the HTTP spec. Was there some design
reason why Post got the special privilege of params in the constructor
but not Put?

schickm

unread,
Sep 25, 2008, 12:54:35 PM9/25/08
to AS3 HttpClient
Oh, and I should not that I am fully aware that I could just call
setFormData(), I'm just wondering architecturally why this decision
was made.

gabe

unread,
Sep 25, 2008, 5:00:52 PM9/25/08
to AS3 HttpClient
Yeah, good call.

I guess, to me, when you do a PUT you are creating a resource at the
URI and so you are more likely to be sending raw data instead of form
data. But in retrospect, yeah, you can create a resource with form
data (why not?). So yeah, I think it makes sense to add a put with
form data method to the client. I'll try to add that in shortly.

"The fundamental difference between the POST and PUT requests is
reflected in the different meaning of the Request-URI. The URI in a
POST request identifies the resource that will handle the enclosed
entity. That resource might be a data-accepting process, a gateway to
some other protocol, or a separate entity that accepts annotations."
-- http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.6

I guess the difference is less about the data it accepts, and more
about whether it creates a resource at the URI (PUT) or whether that
URI is just to process the data (POST).
Reply all
Reply to author
Forward
0 new messages