Execute a request against the service

 @param url_chunk [to_s] string to append to service url
 @param additional_options [Hash] options to pass to Typhoeus
 @return [Typhoeus::Response]
330334
def execute(url_chunk, additional_options = {})
      request = ::Typhoeus::Request.new(
          URI.escape("#{service_url}/#{url_chunk}"),
          options[:typhoeus].merge({ method: :get
                                   })
                            .merge(additional_options)
      )
      request.run
      response = request.response
      validate_response(response)
      response
    end
1020388
function request(svc, operation, params, next, extra) {
    var world = this;

    if (!svc) svc = this.service;
    if (typeof svc === 'string') svc = this[svc];

    svc[operation](params, function(err, data) {
      world.response = this;
      world.error = err;
      world.data = data;

      try {
        if (typeof next.condition === 'function') {
          var condition = next.condition.call(world, world);
          if (!condition) {
            next.fail(new Error('Request success condition failed'));
            return;
          }
        }

        if (extra) {
          extra.call(world, world.response);
          next.call(world);
        }
        else if (extra !== false && err) {
          world.unexpectedError(world.response, next);
        } else {
          next.call(world);
        }
      } catch (err) {
        next.fail(err);
      }
    });
  }
800922
def request_chunked(self, method, url, body=None, headers=None):
        
        headers = HTTPHeaderDict(headers if headers is not None else {})
        skip_accept_encoding = 'accept-encoding' in headers
        skip_host = 'host' in headers
        self.putrequest(
            method,
            url,
            skip_accept_encoding=skip_accept_encoding,
            skip_host=skip_host
        )
        for header, value in headers.items():
            self.putheader(header, value)
        if 'transfer-encoding' not in headers:
            self.putheader('Transfer-Encoding', 'chunked')
        self.endheaders()

        if body is not None:
            stringish_types = six.string_types + (bytes,)
            if isinstance(body, stringish_types):
                body = (body,)
            for chunk in body:
                if not chunk:
                    continue
                if not isinstance(chunk, bytes):
                    chunk = chunk.encode('utf8')
                len_str = hex(len(chunk))[2:]
                self.send(len_str.encode('utf-8'))
                self.send(b'\r\n')
                self.send(chunk)
                self.send(b'\r\n')

        # After the if clause, to always have a closed body
        self.send(b'0\r\n\r\n')
101026
function _submit(){
			// execute the request and use the metadata if available

			if (that.bUseBatch) {
				that.updateSecurityToken();
				// batch requests only need the path without the service URL
				// extract query of url and combine it with the path...
				var sUriQuery = URI.parse(oRequest.requestUri).query;
				//var sRequestUrl = sPath.replace(/\/$/, ""); // remove trailing slash if any
				//sRequestUrl += sUriQuery ? "?" + sUriQuery : "";
				var sRequestUrl = that._createRequestUrl(sPath, null, sUriQuery, that.bUseBatch);
				oRequest = that._createRequest(sRequestUrl, "GET", true);
				var oBatchRequest = that._createBatchRequest([oRequest],true);
				oRequestHandle = that._request(oBatchRequest, _handleSuccess, _handleError, OData.batchHandler, undefined, that.getServiceMetadata());
			} else {
				oRequestHandle = that._request(oRequest, _handleSuccess, _handleError, that.oHandler, undefined, that.getServiceMetadata());
			}

			if (fnHandleUpdate) {
				// Create a wrapper for the request handle to be able to differentiate
				// between intentionally aborted requests and failed requests
				var oWrappedHandle = {
					abort: function() {
						oRequestHandle.bAborted = true;
						oRequestHandle.abort();
					}
				};
				fnHandleUpdate(oWrappedHandle);
			}
		}
1018304
def execute(request_method, path, api_version, data, headers) # :nodoc:
      request.public_send(
        request_method,
        PagSeguro.api_url("#{api_version}/#{path}"),
        extended_data(data),
        extended_headers(request_method, headers)
      )
    end
690078
async def dispatch_request(
        self, request_context: Optional[RequestContext]=None,
    ) -> ResponseReturnValue:
        
        request_ = (request_context or _request_ctx_stack.top).request
        if request_.routing_exception is not None:
            raise request_.routing_exception

        if request_.method == 'OPTIONS' and request_.url_rule.provide_automatic_options:
            return await self.make_default_options_response()

        handler = self.view_functions[request_.url_rule.endpoint]
        return await handler(**request_.view_args)
134561
function(url, args, options) {
            return Requests._execute(url, options, {
                method: "GET",
                params: args
            });
        }
653095
def request(self, url, method = u"get", data = None, headers = None, **kwargs):
        

        url, method, data, headers, kwargs = self._pre_request(url, 
                                                                 method=method,
                                                                 data=data,
                                                                 headers=headers,
                                                                 **kwargs)
        response = self._request(url, method=method, data=data, headers=headers, **kwargs)
        response = self._post_request(response)
        
        # raises the appropriate exceptions
        response = self._handle_response(response)
        
        return response
1348766
def put(query_url,
            headers: {},
            parameters: {})
      HttpRequest.new(HttpMethodEnum::PUT,
                      query_url,
                      headers: headers,
                      parameters: parameters)
    end
1072486
def request(method, *options)
      response_handler = if options.last.is_a?(Hash) && options.last[:handler]
                           options.last.delete(:handler)
                         else
                           handler
                         end

      self.class.base_uri Jiralicious.uri
      before_request if respond_to?(:before_request)
      response = self.class.send(method, *options)
      after_request(response) if respond_to?(:after_request)

      response_handler.call(response)
    end
492103
def request(method, path, params={}, body=nil, headers={}, options={}, &block)
      options = { :mashify => true }.merge(options)
      req = http.build_request(method)
      req.path = path
      req.params.update(Util.clean_params(params)) if params
      req.body = body
      req.headers.update(headers) if headers
      block.call(req) if block
      logger.debug { Util.curl_format(req) }

      if @http_threadsafe
        env = req.to_env(http)
        check_response(http.app.call(env), options)
      else
        @request_mtx.synchronize {
          env = req.to_env(http)
          check_response(http.app.call(env), options)
        }
      end
    end
1029555
def execute(self, url, params):
        
        response = requests.get(url, params=params, **self.config.requests_kwargs)

        if 520 <= response.status_code < 530:
            if self.config.handler52x:
                return self.config.handler52x(response, self, url, params)

        response.raise_for_status()

        if not self.config.response_type:
            return response.json()
        else:
            return response.text
647173
def request(self, method, url, **kwargs):
        

        if "data" in kwargs:
            kwargs["data"] = json.dumps(kwargs["data"])

        kwargs["headers"] = {
            'Content-Type': 'application/json',
            'Authorization': 'token %s' % self.__token__,
        }
        req = make_request(
            method,
            url,
            **kwargs
        )
        self.logger.debug(
            "Request::{}::{}".format(method, url),
            extra={
                "request": kwargs,
                "response": {"headers": req.headers, "code": req.status_code, "data": req.content}
            }
        )
        return req
1034375
def options(path, options = {}, &block)
      perform_request Net::HTTP::Options, path, options, &block
    end
724486
def execute_internal(json_request, &block)

      if json_request.respond_to?(:headers) then
        # always required for posting to API
        json_request.headers["Content-Type"] = "application/json"
      end

      req = HTTPI::Request.new(:url => @uri, :body => json_request.to_wire)

      # add in extra headers if we have a SignedJsonRequest (or anything which has additional headers)
      if json_request.respond_to? :headers then
        req.headers.merge!(json_request.headers)
      end

      if block then
        # execute request with block
        req.on_body(&block)
        HTTPI.post(req)
        return JsonResponse.new("success")

      else
        # execute normal req, and return parsed response
        res = HTTPI.post(req).body
        return JsonResponse.from_json(res)
      end


    end
649227
def _do_request(self, url, params=None, data=None, headers=None):
        

        if not headers:
            headers = {'content-type': 'application/json'}

        try:
            response = requests.get(
                url, params=params, data=data, headers=headers)
        except:
            return None

        if response.status_code == 200:
            return response
585553
def post(url, req_hash={})
      res = nil
      res = perform_op(:post, req_hash) do
        res = @wrapper.post(url, req_hash)
      end
      return res
    end