Generic request builder with request method and path.
@param method
@param path
@return
178607
private HttpClientRequestActionBuilder request(HttpMethod method, String path) {
        HttpClientRequestActionBuilder httpClientRequestActionBuilder;
        if (httpClient != null) {
            httpClientRequestActionBuilder = new HttpClientRequestActionBuilder(action, httpClient);
        } else {
            httpClientRequestActionBuilder = new HttpClientRequestActionBuilder(action, httpClientUri);
        }

        httpClientRequestActionBuilder.withApplicationContext(applicationContext);
        httpClientRequestActionBuilder.method(method);

        if (StringUtils.hasText(path)) {
            httpClientRequestActionBuilder.path(path);
        }

        return httpClientRequestActionBuilder;
    }
775196
def _json_request(self, method, path, data):
        

        response = self._request(method, path, data=data)
        _raise_for_status(response)
        if len(response.data) > 0:
            return _json_from_response(response)
        return response.data
993735
public Route to(Controller controller, String method) {
        Preconditions.checkNotNull(controller);
        Preconditions.checkNotNull(method);
        this.controller = controller;
        try {
            this.controllerMethod = verifyThatControllerAndMethodExists(controller.getClass(),
                    method);
        } catch (Exception e) {
            throw new IllegalArgumentException(ERROR_CTRL + method + ERROR_IN + controller
                    .getClass() + "`, or the method is invalid", e);
        }
        return _build();
    }
336355
private function _buildRequest($method, $path, $body = null, $contentType = null)
	{
		// copy default headers
		$headers = $this->_headers;

		// add Content-Type header if provided
		if ($contentType)
			$headers []= new HeaderField('Content-Type', $contentType);

		$request = new Request(
			$method,
			$this->_url->getUrlForRelativePath($path),
			$headers,
			$body
		);

		// pass the request through the filter chain
		foreach($this->_filters as $filter)
		{
			$request = $filter->request($request);
		}

		return $request;
	}
1122005
public static RequestBuilder newRequest(String method, String url) {
        return new RequestBuilder().method(method).url(url);
    }
968537
public Router<T> addRoute(HttpMethod method, String pathPattern, T target) {
		getMethodlessRouter(method).addRoute(pathPattern, target);
		return this;
	}
1089405
public void parseRequestTarget(String method, String uri) {
        clear();
        _uri = uri;

        if (HttpMethod.CONNECT.is(method))
            _path = uri;
        else
            parse(uri.startsWith("/") ? State.PATH : State.START, uri, 0, uri.length());
    }
1295967
private boolean isHandledByFilter(Method method) {
        // "Resource classes are POJOs that have at least one method annotated
        // with @Path or a request method designator. [...]
        //
        // Resource methods are methods of a resource class annotated with a
        // request method designator. [...] A request method designator is a
        // runtime annotation that is annotated with the @HttpMethod
        // annotation."
        for (Annotation annotation : method.getAnnotations()) {
            if (HttpMethod.class.isAssignableFrom(annotation.annotationType())) {
                return true;
            }
        }

        if (method.isAnnotationPresent(Path.class)) {
            return true;
        }

        return false;
    }
793580
protected List<String> getRoles(String path, String method) {
        if (method.equals("GET")) {
            List<String> roles = new ArrayList<>();
            // restrict if view access role exists
            if (UserGroupCache.getRole(Role.RUNTIME_VIEW) != null) {
                roles.add(Role.RUNTIME_VIEW);
                roles.add(Role.PROCESS_EXECUTION);
                roles.add(Workgroup.SITE_ADMIN_GROUP);
            }
            return roles;
        }
        return getRoles(path);
    }
506454
def request(method, path, options)
      response = connection.send(method) do |request|
        case method
        when :get
          request.url(path, options)
        when :post
          request.path = path
          request.body = options unless options.empty?
        else
          raise Error.new("Unhandled request method #{method}")
        end
      end
      return response.body
    end
605478
def request(method, path, options, &block)
      response = connection(options).send(method) do |request|
        block.call(request) if block_given?
        request.url(path)
      end
      response.body
    end
806633
def method_missing(method, *args)
      request = RequestBuilder.new(@client)
      request.send(method, *args)
      request
    end
132708
def request(http_method, path, body = '', headers = {})
      puts "#{http_method}: #{path} - [#{body}]" if @http_debug
      @request_client.request(http_method, path, body, headers)
    end
505282
function req (method, path) {
  return async function (data) {
    return await this.request(method, path, data)
  }
}
795575
def send_request(method, path, fields = {})
      response = send_logged_request(URI(BASE_URL + path), method, request_data(fields))
      fail UnexpectedHttpResponse, response unless response.is_a? Net::HTTPSuccess
      JSON.parse(response.body)
    end
1337586
public static Request create(String method,
                               String url,
                               Map<String, Collection<String>> headers,
                               byte[] body,
                               Charset charset) {
    checkNotNull(method, "httpMethod of %s", method);
    HttpMethod httpMethod = HttpMethod.valueOf(method.toUpperCase());
    return create(httpMethod, url, headers, body, charset);
  }
286376
protected RestPath getRealPath(String path,String method){
		return getRealPath(gt.getResourceLoader(),path,method);
	}