Create a new request.
<p>
After first call to this method connection parameters can no longer be
updated.

@param servicePath
@param operationName

@return A new request.
978208
public MwsCall newCall(String servicePath, String operationName) {
        if (!frozen) {
            freeze();
        }
        ServiceEndpoint sep = getServiceEndpoint(servicePath);
        // in future use sep+config to determine MwsCall implementation.
        return new MwsAQCall(this, sep, operationName);
    }
1201325
public Builder getRequest(final RequestTypeEnum requestType, final RestOperationTypeEnum restOperation) {
		return getRequest(requestType, restOperation, null);
	}
778164
private static ModelNode getServerfactory(CommandContext ctx, String point, String name) throws OperationFormatException, IOException {
        DefaultOperationRequestBuilder builder = new DefaultOperationRequestBuilder();
        builder.setOperationName(Util.READ_RESOURCE);
        for (String p : point.split("/")) {
            if (p.isEmpty()) {
                continue;
            }
            String[] ps = p.split("=");
            if (ps[1].equals("*")) {
                ps[1] = name;
            }
            builder.addNode(ps[0], ps[1]);
        }
        builder.getModelNode().get(Util.INCLUDE_RUNTIME).set(true);
        ModelNode response = ctx.getModelControllerClient().execute(builder.buildRequest());
        if (Util.isSuccess(response)) {
            return response.get(Util.RESULT);
        }
        return null;
    }
399306
static function createRequestUri($servicePath, $restPath, $params) {
    $requestUrl = $servicePath . $restPath;
    $uriTemplateVars = array();
    $queryVars = array();
    foreach ($params as $paramName => $paramSpec) {
      // Discovery v1.0 puts the canonical location under the 'location' field.
      if (! isset($paramSpec['location'])) {
        $paramSpec['location'] = $paramSpec['restParameterType'];
      }

      if ($paramSpec['type'] == 'boolean') {
        $paramSpec['value'] = ($paramSpec['value']) ? 'true' : 'false';
      }
      if ($paramSpec['location'] == 'path') {
        $uriTemplateVars[$paramName] = $paramSpec['value'];
      } else {
        if (isset($paramSpec['repeated']) && is_array($paramSpec['value'])) {
          foreach ($paramSpec['value'] as $value) {
            $queryVars[] = $paramName . '=' . rawurlencode($value);
          }
        } else {
          $queryVars[] = $paramName . '=' . rawurlencode($paramSpec['value']);
        }
      }
    }

    if (count($uriTemplateVars)) {
      $uriTemplateParser = new URI_Template_Parser($requestUrl);
      $requestUrl = $uriTemplateParser->expand($uriTemplateVars);
    }
    //FIXME work around for the the uri template lib which url encodes
    // the @'s & confuses our servers.
    $requestUrl = str_replace('%40', '@', $requestUrl);

    if (count($queryVars)) {
      $requestUrl .= '?' . implode($queryVars, '&');
    }

    return $requestUrl;
  }
924408
public Instance get(String serviceName) {
        if (serviceName == null) {
            return null;
        }
        return get(serviceName, Strategy.roundRobin());
    }
1227574
private URI createRequestURI(String path,String queryParams) throws URISyntaxException {
        return new URI(j4pServerUrl.getScheme(),
                                  j4pServerUrl.getUserInfo(),
                                  j4pServerUrl.getHost(),
                                  j4pServerUrl.getPort(),
                                  path,
                                  queryParams,null);
    }
1136829
private final static HttpServletRequest createServletRequest(final HttpServletRequest req, final String translatedPath) {
        return new HttpServletRequestWrapper(req){
            @Override
            public String getServletPath() {
                return translatedPath;
            }
        };
    }
953006
protected void addRequiredPath(String requiredPath) {
        if(requiredPath == null) {
            throw new IllegalArgumentException("Required path can't be null.");
        }
        DefaultOperationRequestAddress requiredAddress = new DefaultOperationRequestAddress();
        CommandLineParser.CallbackHandler handler = new DefaultCallbackHandler(requiredAddress);
        try {
            ParserUtil.parseOperationRequest(requiredPath, handler);
        } catch (CommandFormatException e) {
            throw new IllegalArgumentException("Failed to parse nodeType: " + e.getMessage());
        }
        addRequiredPath(requiredAddress);
    }
349896
public <T> T get(String restPath, Class<T> expectedResponse, Map<String, String> queryParams) {
		return call(HttpMethod.GET, restPath, expectedResponse, null, queryParams);
	}
181736
public function create($serviceKey, $requestKey, array $parameters = [])
    {
        $config       = $this->getParamOrFail($this->config, $serviceKey);
        $service      = $this->getServiceParams($config);
        $request      = $this->getRequestParams($config, $requestKey, $service);
        $uri          = $this->buildUri($service['endpoint'], $request['path'], $request['query']);

        list($optionalParameters, $placeholders) = $this->separateParameters($request['body'], $parameters);

        $values       = array_values($parameters);
        $body         = $this->buildBody($request['body'], $request['headers'], $placeholders, $values, $optionalParameters);

        return $this->buildRequest(
            $request['method'],
            $this->replace($uri, $placeholders, $values),
            $this->replaceAll($request['headers'], $placeholders, $values),
            $body,
            $request['version'],
            $request['retries'],
            $request['options'],
            $serviceKey,
            $requestKey
        );
    }
655444
protected JSONObject invokeServiceProcess(String name, Object request, String requestId,
            Map<String,Object> parameters, Map<String,String> headers) throws ServiceException {
        JSONObject responseJson;
        Map<String,String> responseHeaders = new HashMap<>();
        Object responseObject = ServiceLocator.getWorkflowServices().invokeServiceProcess(name,
                request, requestId, parameters, headers, responseHeaders);
        if (responseObject instanceof JSONObject)
            responseJson = (JSONObject) responseObject;
        else if (responseObject instanceof Jsonable)
            responseJson = ((Jsonable) responseObject).getJson();
        else
            throw new ServiceException(HTTP_500_INTERNAL_ERROR,
                    "Unsupported response type: " + (responseObject == null ? null : responseObject.getClass()));
        for (String key : responseHeaders.keySet())
            headers.put(key, responseHeaders.get(key));
        return responseJson;
    }
722037
def create_sp(operations, operation):
    
    operations.execute(
        "CREATE FUNCTION %s %s" % (
            operation.target.name, operation.target.sqltext
        )
    )
754503
public Object invoke(ObjectName objectName,String operationName,Object[]  params, String[] signature)
   {
	   return invoke(null, objectName, operationName,params, signature);
   }
600692
@Override
    public RequestCtx handleRequest(SOAPMessageContext context)
            throws OperationHandlerException {
        RequestCtx req = null;

        Map<URI, AttributeValue> resAttr;
        Map<URI, AttributeValue> actions = new HashMap<URI, AttributeValue>();

        try {
            resAttr = ResourceAttributes.getRepositoryResources();

            actions.put(Constants.ACTION.ID.getURI(),
                        new StringAttribute(Constants.ACTION.FIND_OBJECTS
                                .getURI().toASCIIString()));
            actions.put(Constants.ACTION.API.getURI(),
                        new StringAttribute(Constants.ACTION.APIA.getURI()
                                .toASCIIString()));

            req =
                    getContextHandler().buildRequest(getSubjects(context),
                                                     actions,
                                                     resAttr,
                                                     getEnvironment(context));
        } catch (Exception e) {
            logger.error(e.getMessage(), e);
            throw new OperationHandlerException(e.getMessage(), e);
        }

        return req;
    }
1273989
public OvhTask serviceName_request_POST(String serviceName, OvhRequestActionEnum action) throws IOException {
		String qPath = "/hosting/web/{serviceName}/request";
		StringBuilder sb = path(qPath, serviceName);
		HashMap<String, Object>o = new HashMap<String, Object>();
		addBody(o, "action", action);
		String resp = exec(qPath, "POST", sb.toString(), o);
		return convertTo(resp, OvhTask.class);
	}
1119357
@VisibleForTesting
    static String makeEndPointPath(ServiceEndPoint endPoint) {
        String servicePath = makeServicePath(endPoint.getServiceName());
        String id = endPoint.getId();
        return ZKPaths.makePath(servicePath, id);
    }
1284142
private <T> PubsubFuture<T> requestJavaNet(final String operation, final HttpMethod method, final String path,
      final Object payload, final ResponseReader<T> responseReader) {

    final HttpRequestFactory requestFactory = transport.createRequestFactory();

    final String uri = baseUri + path;

    final HttpHeaders headers = new HttpHeaders();
    final HttpRequest request;
    try {
      request = requestFactory.buildRequest(method.getName(), new GenericUrl(URI.create(uri)), null);
    } catch (IOException e) {
      throw Throwables.propagate(e);
    }

    headers.setAuthorization("Bearer " + accessToken);
    headers.setUserAgent("Spotify");

    final long payloadSize;
    if (payload != NO_PAYLOAD) {
      final byte[] json = gzipJson(payload);
      payloadSize = json.length;
      headers.setContentEncoding(GZIP);
      headers.setContentLength((long) json.length);
      headers.setContentType(APPLICATION_JSON_UTF8);
      request.setContent(new ByteArrayContent(APPLICATION_JSON_UTF8, json));
    } else {
      payloadSize = 0;
    }

    request.setHeaders(headers);

    final RequestInfo requestInfo = RequestInfo.builder()
        .operation(operation)
        .method(method.toString())
        .uri(uri)
        .payloadSize(payloadSize)
        .build();

    final PubsubFuture<T> future = new PubsubFuture<>(requestInfo);

    executor.execute(() -> {
      final HttpResponse response;
      try {
        response = request.execute();
      } catch (IOException e) {
        future.fail(e);
        return;
      }

      // Return null for 404'd GET & DELETE requests
      if (response.getStatusCode() == 404 && method == HttpMethod.GET || method == HttpMethod.DELETE) {
        future.succeed(null);
        return;
      }

      // Fail on non-2xx responses
      final int statusCode = response.getStatusCode();
      if (!(statusCode >= 200 && statusCode < 300)) {
        future.fail(new RequestFailedException(response.getStatusCode(), response.getStatusMessage()));
        return;
      }

      if (responseReader == VOID) {
        future.succeed(null);
        return;
      }

      try {

        future.succeed(responseReader.read(ByteStreams.toByteArray(response.getContent())));
      } catch (Exception e) {
        future.fail(e);
      }
    });

    return future;
  }