this contains post example plus others, mainly string content not binary content

https://openjdk.java.net/groups/net/httpclient/recipes.html

this contains reading file examples

https://docs.oracle.com/javase/tutorial/essential/io/file.html


i’ll look at doing a pull request to the tika documentation t include a basic 
example

Sent from my iPhone

> On 4 Feb 2020, at 16:25, Eric Pugh <[email protected]> wrote:
> 
> Shockingly, I can’t find a nice example of Java code being used to do a HTTP 
> POST of a file to Tika Server.
> 
> The CURL command that I want to convert to Java code is:
> 
> curl -T /myfile.pdf http://localhost:9998/rmeta --header "X-Tika-OCRLanguage: 
> eng" --header "X-Tika-PDFOcrStrategy: ocr_and_text_extraction" --header 
> "X-Tika-OCRoutputType: hocr"
> 
> I’m not having much luck, so was wondering if anyone in the community had an 
> example?
> 
> Eric
> 
> 
> 
> _______________________
> Eric Pugh | Founder & CEO | OpenSource Connections, LLC | 434.466.1467 | 
> http://www.opensourceconnections.com | My Free/Busy  
> Co-Author: Apache Solr Enterprise Search Server, 3rd Ed       
> This e-mail and all contents, including attachments, is considered to be 
> Company Confidential unless explicitly stated otherwise, regardless of 
> whether attachments are marked as such.
> 

Reply via email to