Created
November 16, 2015 06:19
-
-
Save Dispader/b1fb6ad04d4913be86d7 to your computer and use it in GitHub Desktop.
example of calling online OCR web service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Grab(group='org.codehaus.groovy.modules.http-builder', module='http-builder', version='0.7' ) | |
import groovy.io.FileType | |
import groovyx.net.http.RESTClient | |
import static groovyx.net.http.ContentType.* | |
def standingsFile = new File('./src/test/resources/2015/fall/advsundiv.pdf') | |
def client = new RESTClient( 'http://beta.offenedaten.de:9998/tika' ) | |
def response = client.put( requestContentType: BINARY, body: standingsFile.bytes ) | |
println response.data.text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment