PUT vs. POST in tika-server

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

PUT vs. POST in tika-server

Jukka Zitting
Hi,

I notice the tika-server component (nice work documenting and setting
it up, btw!) uses the PUT verb for receiving documents to be parsed.

The HTTP spec says the following about PUT:

    "The PUT method requests that the enclosed entity be stored under
the supplied Request-URI."

IMO a more appropriate verb to use is POST, that's meant (among other
things) for:

    "Providing a block of data [...] to a data-handling process;"

... which is what tika-server does.

BR,

Jukka Zitting
Reply | Threaded
Open this post in threaded view
|

Re: PUT vs. POST in tika-server

Maxim Valyanskiy
Hello!

05.04.2012 12:29, Jukka Zitting написал:
> I notice the tika-server component (nice work documenting and setting
> it up, btw!) uses the PUT verb for receiving documents to be parsed.
> IMO a more appropriate verb to use is POST, that's meant (among other
> things) for:
>
>      "Providing a block of data [...] to a data-handling process;"
>
> ... which is what tika-server does.
>

I use PUT only because curl's command line for PUT is simpler than for POST. I
think we can add POST support too, I hope it can be done simply by addition of
@POST annotation to all resource methods.

best wishes, Max
Reply | Threaded
Open this post in threaded view
|

Re: PUT vs. POST in tika-server

Mattmann, Chris A (3010)
In reply to this post by Jukka Zitting
Hi Guys,

Yeah, I am happy to annotate the code with @POST too like Max suggested.

I opened https://issues.apache.org/jira/browse/TIKA-891 to track this.

Thanks!

Cheers,
Chris

On Apr 5, 2012, at 1:29 AM, Jukka Zitting wrote:

> Hi,
>
> I notice the tika-server component (nice work documenting and setting
> it up, btw!) uses the PUT verb for receiving documents to be parsed.
>
> The HTTP spec says the following about PUT:
>
>    "The PUT method requests that the enclosed entity be stored under
> the supplied Request-URI."
>
> IMO a more appropriate verb to use is POST, that's meant (among other
> things) for:
>
>    "Providing a block of data [...] to a data-handling process;"
>
> ... which is what tika-server does.
>
> BR,
>
> Jukka Zitting


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Chris Mattmann, Ph.D.
Senior Computer Scientist
NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA
Office: 171-266B, Mailstop: 171-246
Email: [hidden email]
WWW:   http://sunset.usc.edu/~mattmann/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adjunct Assistant Professor, Computer Science Department
University of Southern California, Los Angeles, CA 90089 USA
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Reply | Threaded
Open this post in threaded view
|

Re: PUT vs. POST in tika-server

Ingo Renner
In reply to this post by Jukka Zitting

Am 05.04.2012 um 10:29 schrieb Jukka Zitting:

Hi all,

> IMO a more appropriate verb to use is POST, that's meant (among other
> things) for:

+1, I'd also prefer to have POST, also as the default.


best
Ingo

--
Ingo Renner
TYPO3 Core Developer, Release Manager TYPO3 4.2, Admin Google Summer of Code

TYPO3
Open Source Enterprise Content Management System
http://typo3.org