a RESTResponse object.
504376
private RESTResponse readResponse() throws IOException {
        // Read response code from the header line.
        HttpCode resultCode = readStatusLine();
        
        // Read and save headers, keeping track of content-length if we find it.
        Map<String, String> headers = new HashMap<String, String>();
        int contentLength = 0;
        String headerLine = readHeader();
        while (headerLine.length() > 2) {
            // Read header and split into parts based on ":" separator. Both parts are
            // trimmed, and the header is up-cased.
            int colonInx = headerLine.indexOf(':');
            String headerName =     // Use the whole line if there's no colon
                colonInx <= 0 ? headerLine.trim().toUpperCase()
                              : headerLine.substring(0, colonInx).trim().toUpperCase();
            String headerValue =    // Use an empty string if there's no colon
                colonInx <= 0 ? "" : headerLine.substring(colonInx + 1).trim();
            headers.put(headerName, headerValue);
            if (headerName.equals(HttpDefs.CONTENT_LENGTH)) {
                try {
                    contentLength = Integer.parseInt(headerValue);
                } catch (NumberFormatException e) {
                    // Turn into IOException
                    throw new IOException("Invalid content-length value: " + headerLine);
                }
            }
            headerLine = readHeader();
        }

        // Final header line should be CRLF
        if (!headerLine.equals("\r\n")) {
            throw new IOException("Header not properly terminated: " + headerLine);
        }
        
        // If we have a response entity, read that now.
        byte[] body = null;
        if (contentLength > 0) {
            body = readBody(contentLength);
            
            // Decompress output entity if needed.
            String contentEncoding = headers.get(HttpDefs.CONTENT_ENCODING);
            if (contentEncoding != null) {
                Utils.require(contentEncoding.equalsIgnoreCase("gzip"),
                              "Unrecognized output Content-Encoding: " + contentEncoding);
                body = Utils.decompressGZIP(body);
            }
        }
        return new RESTResponse(resultCode, body, headers);
    }
105213
function parseResponse(cb) {
  return function parse(err, response, body) {
    // TODO Handel the errors
    cb(err, JSON.parse(body))
  }
}
423600
def hook_response(self, response):
        " "
        # Decode content with json.
        response._content = json.loads(response.content)
        return response
1132631
def process_request(self, request_object):
        """"""

        resource = request_object.entity_cls.create(**request_object.data)
        return ResponseSuccessCreated(resource)
490392
def response(self, data, rest):
        '''
        '''
        self.connection.write(data)
        data = data[:-len(self.separator)]
        # If we get a QUIT message, close the connection
        # Used by the test suite.
        if data == b'QUIT':
            self.connection.close()
        return data
696435
def update_response_object(self, service_id, version_number, name_key, **kwargs):
		""""""
		body = self._formdata(kwargs, FastlyResponseObject.FIELDS)
		content = self._fetch("/service/%s/version/%d/response_object/%s" % (service_id, version_number, name_key), method="PUT", body=body)
		return FastlyResponseObject(self, content)
1181143
def response(self, status, content_type, content, headers=None):
        

        assert not isinstance(content, (str, bytes)), 'response content cannot be of type str or bytes'
        response_headers = [('Content-Type', content_type)]
        if headers:
            response_headers.extend(headers)
        self.start_response(status, response_headers)
        return content
499473
function (response) {
        _.each(response, (value, key) => {
          response[key] = value
        })

        return response
      }
304098
private FrequentlyRelatedItemSearchResponse parseResponseObject(JSONObject object) {
        Object o = object.get(ERROR_KEY);
        if(o!=null) {
            if(o instanceof String) {
                return new FrequentlyRelatedItemSearchResponse(-1,true,(String)o,false,FrequentlyRelatedItemSearchResponse.EMPTY_FACETS);

            } else {
                return FrequentlyRelatedItemSearchResponse.RESPONSE_ERROR;
            }
        }
        else {
            long taken = getResponseTime(object);
            boolean timedOut = getTimedOut(object);
            TermFacet[] facets = getFacets(object);

            return new FrequentlyRelatedItemSearchResponse(taken,false,"",timedOut,facets);
        }
    }
1030120
def process_request(self, request_object):
        """"""

        identifier = request_object.identifier

        # Look for the object by its ID and return it
        resource = request_object.entity_cls.get(identifier)
        return ResponseSuccess(Status.SUCCESS, resource)
447148
function fullResponse() {
    function restifyResponseHeaders(req, res, next) {
        res.once('header', function () {

            // Restify 1.0 compatibility
            if (res.defaultResponseFormatters) {
                res.defaultResponseFormatters(res._data);
            }

            res.emit('beforeSend', res._data, res._body);

            // end backwards-compatibility
            return (setHeaders(req, res));
        });

        return (next());
    }

    return (restifyResponseHeaders);
}
954693
function processResponse(err, res, body) {

    if (err) { return cb(err); }

    if (res.statusCode !== 200) {
      return cb(new ScrapeError('Not OK response from server.', res, body));
    }

    parseBody(body, model, options, cb);

  }
295091
def handleResponse(self, data):
        """"""

        self.factory.response_xml = data

        if self.status == '200':
            self.factory.parseErrorAndResponse(data)

        self.factory.deferred = None
        self.transport.loseConnection()
1031879
def create_response_object(self, service_id, version_number, name, status="200", response="OK", content="", request_condition=None, cache_condition=None):
		""""""
		body = self._formdata({
			"name": name,
			"status": status,
			"response": response,
			"content": content,
			"request_condition": request_condition,
			"cache_condition": cache_condition,
		}, FastlyResponseObject.FIELDS)
		content = self._fetch("/service/%s/version/%d/response_object" % (service_id, version_number), method="POST", body=body)
		return FastlyResponseObject(self, content)
124617
function buildResponse(data) {
    var response = {};
    response.totalItems = data.length;
    response.itemsPerPage = itemsPerPage;
    response.totalPages = itemsPerPage === null ? 1 : Math.ceil(data.length / itemsPerPage);
    response.currentPage = itemsPerPage === null ? 1 : currentPage;
    response.data = itemsPerPage === null ? data : data.slice(itemsPerPage * (currentPage - 1), itemsPerPage);

    return response;
}
18966
def _post_response(self, params):
        
        return self._session.post(
            self._api_url, data=params, timeout=self._timeout
        ).json(encoding="utf8")
601072
def response(status, description, resource=DefaultResource):
    # type: (HTTPStatus, str, Optional[Resource]) -> Callable
    
    def inner(o):
        value = Response(status, description, resource)
        try:
            getattr(o, 'responses').add(value)
        except AttributeError:
            setattr(o, 'responses', {value})
        return o
    return inner