Process and apply request headers.
776496
protected function setHeaders() {
        $headers = $this->request->getHeaders()->toFlatArray();
        $this->resource->setOption(CURLOPT_HTTPHEADER, $headers);
    }
964619
protected function applySoapHeaders()
    {
        $headers = $this->request->getHeaders() ?: [];

        if ($headers instanceof SoapHeader) {

            $headers = [ $headers ];

        } else {

            foreach ($headers as &$header) {
                if ($header instanceof SoapHeader) continue;

                $namespace      = isset($header['namespace']) ? $header['namespace'] : null;
                $name           = isset($header['name']) ? $header['name'] : null;
                $data           = isset($header['data']) ? $header['data'] : null;
                $mustUnderstand = isset($header['mustunderstand']) ? $header['mustunderstand'] : null;
                $actor          = isset($header['actor']) ? $header['actor'] : null;

                $header = new SoapHeader($namespace, $name, $data, $mustUnderstand, $actor);
            }
        }

        unset($header);

        $this->client->__setSoapHeaders($headers);
    }
7603
def on_headers(self, response, exc=None):
        ''''''

        if response.status_code == 101:
            connection = response.connection
            request = response.request
            handler = request.websocket_handler
            if not handler:
                handler = WS()
            parser = request.client.frame_parser(kind=1)
            consumer = partial(WebSocketClient.create,
                               response, handler, parser)
            connection.upgrade(consumer)
            response.event('post_request').fire()
            websocket = connection.current_consumer()
            response.request_again = lambda r: websocket
1252133
function setHeaders(req, headers) {
        var i;
        for (i = 0; i < headers.length; ++i) {
            req.setRequestHeader(headers[i][0], headers[i][1]);
        }
    }
956163
def _headers(self, others={}):
        """"""
        headers = {
            'Content-Type': 'application/json'
        }

        for p in others.keys():
            headers[p] = others[p]
        return headers
796994
def process_request(self, request_object):
        """"""

        # Retrieve the object by its identifier
        entity = request_object.entity_cls.get(request_object.identifier)

        # Update the object and return the updated data
        resource = entity.update(request_object.data)
        return ResponseSuccess(Status.SUCCESS, resource)
1228795
def do_HEAD(self):
        """"""
        self.queue.put(self.headers.get("User-Agent"))
        self.send_response(six.moves.BaseHTTPServer.HTTPStatus.OK)
        self.send_header("Location", self.path)
        self.end_headers()
495424
public function sendHeaders(): void
    {
        foreach ((array) $this->headers as $name => $value) {
            $this->sendHeader($name, $value);
        }
    }
137773
def parse_headers(self, req, name, field):
        """"""
        return get_value(req.headers, name, field)
944321
private static function headers() {
        if (empty(self::$config['httpHeaders'])) {
            return;
        }

        $response = self::$config['httpContext']->getResponse();
        $response->setHeaders(self::$config['httpHeaders']);
    }
299659
def process(request, body, status, headers, exception = nil)
      request.env[ENV_RUNTIME]   = Time.now.to_f - request.env[ENV_RUNTIME_START]
      request.env[ENV_EXCEPTION] = nil

      if !exception.nil?
        request.env[ENV_EXCEPTION] = exception
        WebProfiler::Engine.process_exception(request).finish
      else
        WebProfiler::Engine.process(request, body, status, headers).finish
      end
    end
770970
def ProcessRequest(self, method_config, request):
        """"""
        if self.log_request:
            logging.info(
                'Calling method %s with %s: %s', method_config.method_id,
                method_config.request_type_name, request)
        return request
214229
def process_request(self, unused_request):
    """"""
    # Compare to the first half of toplevel() in context.py.
    tasklets._state.clear_all_pending()
    # Create and install a new context.
    ctx = tasklets.make_default_context()
    tasklets.set_context(ctx)
25182
def setup_request_sessions(self):
        
        self.req_session = requests.Session()
        self.req_session.headers.update(self.headers)
1106722
def process_request(self, request, response):
        """"""
        self.logger.info('Requested: {0} {1} {2}'.format(request.method, request.relative_uri, request.content_type))
137550
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
    {
        $response = $handler->handle($request);

        return $this->withStaticHeaders($response, $this->headers);
    }
1203680
def end_headers(self):
        """"""
        if self.request_version != 'HTTP/0.9':
            self._headers_buffer.append(b"\r\n")
            self.flush_headers()