Re: Having file: support POST (and probably some other methods)

[email protected] (Gisle Aas)
Newsgroups perl.libwww
Message-ID <[email protected]>
On Thu, May 6, 2010 at 21:03, Jeff Macdonald <[email protected]> wrote:
> I was writing some tests for some code in which a URI can be passed as
> an option. This code POSTs to the URI. Instead of having the test
> create a local web server, I thought it would be nice if file URI's
> could be posted to. Is this a nutty idea? This way the test could just
> then read the data created at the specified file URI.
>
> Something like this:
>
> POST file:/some/path/data
>
> would cause all the posted data to show up in data.

I would be nutty to make the regular file protocol handler in LWP do
something with posted data.  There must be some way for the POST
end-point to define the semantics of this operation.  There is no
natural default.

If this is just for rigging a test, you could just set up you own
handling code with LWP::Protocol::implementor() and then use whatever
scheme name you want.

--Gisle
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.