Raw HTTP response data.

@param responseData
@return
499282
public RequestResponse setResponseData(byte[] responseData) {
        this.responseData = responseData;
        try {
            responseJson = responseData != null ? SerializationUtils.readJson(responseData) : null;
        } catch (Exception e) {
            responseJson = null;
            LOGGER.error(e.getMessage(), e);
        }
        return this;
    }
751604
public function fillRawData(string $rawData): TelegramResponse
    {
        $this->rawData = $rawData;
        $this->decodedData = json_decode($this->rawData, true);

        if ($this->decodedData['ok'] === false) {
            $exception = new ClientException();
            $exception->setError(new UnsuccessfulRequest($this->decodedData));
            throw $exception;
        }

        return $this;
    }
674388
public static String fileTransfer(Map<String, String> reqData) {
		return HttpUtils.post(SDKConfig.getConfig().getFileTransUrl(), reqData);
	}
13770
protected void prepareForwardedResponseHeaders(ResponseData response) {
        HttpHeaders headers = response.getHeaders();
        headers.remove(TRANSFER_ENCODING);
        headers.remove(CONNECTION);
        headers.remove("Public-Key-Pins");
        headers.remove(SERVER);
        headers.remove("Strict-Transport-Security");
    }
155067
public function parseResponse($responseLine, $responseData)
	{
		list($code, $count) = explode(' ', $responseLine);

		return $this->_createResponse($code, array(
			'kicked' => (int)$count,
		));
	}
346925
private String getResponseContent(CachingClientHttpResponseWrapper response) throws IOException {
        if (response != null) {
            StringBuilder builder = new StringBuilder();
            
            builder.append("HTTP/1.1 "); // TODO get Http version from message
            builder.append(response.getStatusCode());
            builder.append(" ");
            builder.append(response.getStatusText());
            builder.append(NEWLINE);
            
            appendHeaders(response.getHeaders(), builder);
            
            builder.append(NEWLINE);
            builder.append(response.getBodyContent());
            
            return builder.toString();
        } else {
            return "";
        }
    }
704513
protected function normalizeData($rawData)
    {
        $data = array();
        foreach ($rawData as $key => $value) {
            if (is_array($value)) {
                $item = array('text' => $key, 'children' => $this->normalizeData($rawData[$key]));
            } else {
                $item = array('id' => $key, 'text' => $value);
            }
            $data[] = $item;
        }
        return $data;
    }
44186
public static String singleQuery(Map<String, String> reqData) {
		return HttpUtils.post(SDKConfig.getConfig().getSingleQueryUrl(), reqData);
	}
340948
public static byte[] readHttpResponse(HttpURLConnection connection) {
    byte[] res;

    try {
      if (connection.getResponseCode() != HttpURLConnection.HTTP_OK) {
        LOG.log(Level.WARNING, "Http Response not OK: " + connection.getResponseCode());
      }
    } catch (IOException e) {
      LOG.log(Level.SEVERE, "Failed to get response code", e);
      return new byte[0];
    }

    int responseLength = connection.getContentLength();
    if (responseLength <= 0) {
      LOG.log(Level.SEVERE, "Response length abnormal: " + responseLength);
      return new byte[0];
    }

    try {
      res = new byte[responseLength];

      InputStream is = connection.getInputStream();

      int off = 0;
      int bRead = 0;
      while (off != (responseLength - 1)
          && (bRead = is.read(res, off, responseLength - off)) != -1) {
        off += bRead;
      }

      return res;
    } catch (IOException e) {
      LOG.log(Level.SEVERE, "Failed to read response: ", e);
      return new byte[0];
    } finally {
      try {
        connection.getInputStream().close();
      } catch (IOException e) {
        LOG.log(Level.SEVERE, "Failed to close InputStream: ", e);
        return new byte[0];
      }
    }
  }
746843
public RequestResponse setRequestData(Object requestData) {
        this.requestData = requestData;
        requestJson = requestData != null
                ? (requestData instanceof JsonNode ? (JsonNode) requestData
                        : SerializationUtils.toJson(requestData))
                : null;
        return this;
    }
761460
public static RawData nl2br(Object data) {
        return new RawData(StringEscapeUtils.escapeHtml4(str(data)).replaceAll("(\\r\\n|\\n|\\r)", "<br/>"));
    }
1259027
public void getDataFromClient(HttpRequestBase httpget, OutputStream streamOut) throws ClientProtocolException, IOException
    {
    	HttpClient httpclient = new DefaultHttpClient();
    	     	 
    	 // Execute the request
    	 HttpResponse response = httpclient.execute(httpget);
    	 
    	 // Get the response entity
    	 HttpEntity entity = response.getEntity();
    	 
    	 if (entity != null)
    	 {
	    	 InputStream instream = entity.getContent();
	    	    	 
		     ProxyServlet.transferURLStream(instream, streamOut);
	
	         // Closing the input stream will trigger connection release
	         instream.close();
	    	         	     
	         // There is probably a less resource intensive way to do this.
	         httpclient.getConnectionManager().shutdown();
    	 }
    }
715924
@Override
   public final DATATYPE getData() {
      return (data != null) ? data : convert(getValue(DATA, String.class));
   }
1050268
func responseData(resp *http.Response) *Response {
	return &Response{
		Status:        resp.StatusCode,
		ContentLength: resp.ContentLength,
	}
}
883582
DataBuffer toDataBuffer(HttpData httpData) {
        requireNonNull(httpData, "httpData");
        if (!(httpData instanceof ByteBufHttpData)) {
            return delegate.wrap(
                    ByteBuffer.wrap(httpData.array(), httpData.offset(), httpData.length()));
        }
        return converter.apply((ByteBufHttpData) httpData);
    }
1244977
public static ObjectStream<Parse> getParseStream(final String inputData)
      throws IOException {
    final ObjectStream<String> parseStream = IOUtils
        .readFileIntoMarkableStreamFactory(inputData);
    final ObjectStream<Parse> samples = new ParseSampleStream(parseStream);
    return samples;
  }
751040
public static Map<String, Object> parseData(String data) {
		Map<String, Object> ret = new HashMap<String, Object>();
		String[] split = data.split("&");
		for (String s : split) {
			int idx = s.indexOf('=');
			try {
				if (idx != -1) {
					ret.put(URLDecoder.decode(s.substring(0, idx), "UTF-8"), URLDecoder.decode(s.substring(idx + 1), "UTF-8"));
				} else {
					ret.put(URLDecoder.decode(s, "UTF-8"), "true");
				}
			} catch (UnsupportedEncodingException e) {
				// Why.
			}
		}
		return ret;
	}