Open mlt opened 4 years ago
It took me a while to figure out how to feed data to Apache Tika Server content analyzer as it wants simple PUT with binary file content. The equivalent for
curl -T somestuff.dat http://localhost:9998/meta --header "Accept: application/json"
would be
uri = URI.parse('http://localhost:9998/meta') http = Net::HTTP.new(uri.host, uri.port) dat = File.read('somestuff.dat') response = http.request_put(uri.path, dat, Accept: 'application/json', 'Content-Type': 'application/octet-stream')
Thanks for the PUT example with binary data.
It took me a while to figure out how to feed data to Apache Tika Server content analyzer as it wants simple PUT with binary file content. The equivalent for
would be