Examples of HttpMethod


Examples of org.richfaces.test.staging.HttpMethod

    StagingConnection connection = localServer.getConnection(settings.getUrl());
    // Propagate web request settings to the local connection.
    for (NameValuePair param : settings.getRequestParameters()) {
      connection.addRequestParameter(param.getName(), param.getValue());
    }
    HttpMethod httpMethod = HttpMethod.valueOf(settings.getHttpMethod().toString());
    connection.setRequestMethod(httpMethod);
    connection.setRequestCharacterEncoding(settings.getCharset());
    String body = settings.getRequestBody();
    String contentType = settings.getEncodingType().getName();
    connection.setRequestBody(body);
View Full Code Here

Examples of org.springframework.http.HttpMethod

  }
 
  protected <T extends ApiEntity> T saveEntity(String baseUrl, T entity) {
   
    String url;
    HttpMethod method;
   
    if(hasText(entity.getId())) {
      url = baseUrl + '/' + entity.getId();
      method = PUT;
    } else {
View Full Code Here

Examples of org.springframework.http.HttpMethod

  }
 
  protected <T extends ApiEntity> T saveEntity(String baseUrl, T entity) {
   
    String url;
    HttpMethod method;
   
    if(hasText(entity.getId())) {
      url = baseUrl + '/' + entity.getId();
      method = PUT;
    } else {
View Full Code Here

Examples of org.springframework.http.HttpMethod

*/
public class RestTemplateClient implements Client {
    @Override
    public Response execute(Request request, Request.Options options) throws IOException {
        RestTemplate restTemplate = new RestTemplate();
        HttpMethod method = HttpMethod.valueOf(request.method());

        HttpHeaders requestHeaders = new HttpHeaders();
        for (String header: request.headers().keySet()) {
            Collection<String> values = request.headers().get(header);
            if (values != null && !values.isEmpty())
View Full Code Here

Examples of org.wicketstuff.rest.utils.http.HttpMethod

  @Override
  public final void respond(Attributes attributes)
  {
    AttributesWrapper attributesWrapper = new AttributesWrapper(attributes);
    WebResponse response = attributesWrapper.getWebResponse();
    HttpMethod httpMethod = attributesWrapper.getHttpMethod();

    // select the best "candidate" method to serve the request
    ScoreMethodAndExtractPathVars mappedMethod = selectMostSuitedMethod(attributesWrapper);

    if (mappedMethod != null)
View Full Code Here

Examples of ratpack.http.HttpMethod

  public MethodHandler(String method) {
    this.method = method.toUpperCase();
  }

  public void handle(Context context) {
    HttpMethod requestMethod = context.getRequest().getMethod();
    if (requestMethod.name(method)) {
      context.next();
    } else if (requestMethod.isOptions()) {
      Response response = context.getResponse();
      response.getHeaders().add(HttpHeaderConstants.ALLOW, method);
      response.status(200).send();
    } else {
      context.clientError(405);
View Full Code Here

Examples of spark.route.HttpMethod

                    }
                }
            }
            // BEFORE filters, END

            HttpMethod httpMethod = HttpMethod.valueOf(httpMethodStr);

            RouteMatch match = null;
            match = routeMatcher.findTargetForRequestedRoute(httpMethod, uri, acceptType);

            Object target = null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.