File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
src/main/java/com/bitpay/sdk/client Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change 1717public class HttpResponseProvider {
1818
1919 public static HttpResponse fromApacheHttpResponse (org .apache .http .HttpResponse apacheHttpResponse )
20- throws BitPayApiException {
20+ throws BitPayApiException {
2121 try {
2222 final HttpEntity entity = apacheHttpResponse .getEntity ();
2323 String body = EntityUtils .toString (entity , "UTF-8" );
2424
2525 return new HttpResponse (
26- apacheHttpResponse .getStatusLine ().getStatusCode (),
27- body ,
28- Arrays .stream (apacheHttpResponse .getAllHeaders ())
29- .collect (Collectors .toMap (Header ::getName , Header ::getValue )),
30- apacheHttpResponse .getLocale ().toString (),
31- apacheHttpResponse .getStatusLine ().getProtocolVersion ().toString ()
32- );
26+ apacheHttpResponse .getStatusLine ().getStatusCode (),
27+ body ,
28+ Arrays .stream (apacheHttpResponse .getAllHeaders ())
29+ .collect (Collectors .toMap (
30+ Header ::getName ,
31+ Header ::getValue ,
32+ (v1 , v2 ) -> v1 + "," + v2 )),
33+ apacheHttpResponse .getLocale ().toString (),
34+ apacheHttpResponse .getStatusLine ().getProtocolVersion ().toString ());
3335
3436 } catch (IOException e ) {
3537 BitPayExceptionProvider .throwApiExceptionWithMessage (e .getMessage ());
You can’t perform that action at this time.
0 commit comments