Parsing of Content-Type containing 'charset' parameter.

I’ve made that change and pushed it to my github branch.

Do I need to do anything else now?

From: John Wagenleitner [mailto:notifications@github.com]
Sent: 08 July 2014 15:34
To: jwagenleitner/groovy-wslite
Cc: Greenwood Neil
Subject: Re: [groovy-wslite] Parsing of Content-Type containing 'charset' parameter. (#76)


In src/main/groovy/wslite/rest/ResponseBuilder.groovy:

> @@ -60,4 +61,8 @@ class ResponseBuilder {

>          return content.trim().startsWith('[') ? new JSONArray(content) : new JSONObject(content)

>      }

>

> +    private String contentTypeNoParameter(HTTPResponse httpResponse) {

There's a utility class wslite.http.ContentTypeHeader that can parse out the media type. The following should work as the body of this method.

return new ContentTypeHeader(httpResponse.contentType).mediaType

If you have time to push the change then I'll merge in.

—
Reply to this email directly or view it on GitHub<https://github.com/jwagenleitner/groovy-wslite/pull/76/files#r14655651>.