Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: HTTPBuilder-0.5.2
-
Fix Version/s: None
-
Component/s: HttpBuilder
-
Labels:None
-
Environment:Groovy Version: 1.8.5 JVM: 1.6.0_29 Vendor: Apple Inc. OS: Mac OS X
Description
When a requestContentType and a POST/PUT body are specified and the given request content type has no registered encoder in the encoder registry, a NP is thrown.
def response = httpUrlClient.request(
url: URL,
method: 'POST',
requestContentType: 'x-www-form-urlencoded', // instead of application/x-www-form-urlencoded
body: params)
leads to
java.lang.NullPointerException
at groovyx.net.http.HttpURLClient.request(HttpURLClient.java:207)
at groovyx.net.http.HttpURLClient$request.call(Unknown Source)
patch including bug fix and test-case