You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by Apache Wiki <wi...@apache.org> on 2014/06/14 20:44:01 UTC
[Tika Wiki] Update of "TikaJAXRS" by ChrisMattmann
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Tika Wiki" for change notification.
The "TikaJAXRS" page has been changed by ChrisMattmann:
https://wiki.apache.org/tika/TikaJAXRS?action=diff&rev1=21&rev2=22
Comment:
- add in docs on DetectorResource
$ curl -T price.xls http://localhost:9998/tika --header "Accept: text/html"
$ curl -T price.xls http://localhost:9998/tika --header "Accept: text/plain"
}}}
+
+ == Detector Resource ==
+ {{{
+ /detect/stream
+ }}}
+ HTTP PUTs a document and uses the Default Detector from Tika to identify its MIME/media type.
+ The caveat here is that providing a hint for the filename can increase the quality of detection.
+
+ Default return is a string of the Media type name.
+
+ Some Example calls with cURL:
+
+ === PUT an RTF file and get back RTF ===
+ {{{
+ $ curl -X PUT -d @TODO.rtf http://localhost:9998/detect/stream
+ }}}
+ === PUT a CSV file without filename hint and get back text/plain ===
+ {{{
+ $ curl -X PUT --upload-file foo.csv http://localhost:9998/detect/stream
+ }}}
+ === PUT a CSV file with filename hint and get back text/csv ===
+ {{{
+ $ curl -X PUT -H "Content-Disposition: attachment; filename=foo.csv" --upload-file foo.csv http://localhost:9998/detect/stream
+ }}}
+
== Unpacker Resource ==
{{{
/unpacker