jgritman/httpbuilder

NoSuchMethodError on binary content with Groovy 3

Bert-R opened this issue · 1 comments

When receiving a binary response using Groovy 3, the following exception occurs:

java.lang.NoSuchMethodError: org.codehaus.groovy.runtime.DefaultGroovyMethods.leftShift(Ljava/io/OutputStream;Ljava/io/InputStream;)Ljava/io/OutputStream;
    at groovyx.net.http.HTTPBuilder.defaultSuccessHandler(HTTPBuilder.java:620)
    at groovyx.net.http.RESTClient.defaultSuccessHandler(RESTClient.java:246)
...

The response carries the following headers:

Content-Disposition: form-data; name="file"; filename="MyPhoto.jpg"
Content-Type: image/jpeg
Content-Transfer-Encoding: binary

Immediately after logging this issue, I found PR #90, which fixes this issue.