Package org.springframework.http

Examples of org.springframework.http.HttpMethod


      System.out.println("submitting form " + name + " with " + formRequest);
      URI uri = formRequest.getURI();
      if (!uri.isAbsolute()) {
        uri = new URI(context.toASCIIString() + uri.toASCIIString());
      }
      HttpMethod method = formRequest.getMethod();
      switch (method) {
      case GET: {
        uri = new URI(uri.getScheme(), uri.getAuthority(), uri.getPath(), formRequest.getRequestBody(), null);
        HttpGet httpGet = createGet(uri);
        currentResource = httpClient.execute(httpGet, responseHandler);
View Full Code Here


  @Given("^(?:i )?(?:call|request|execute) (" + HTTP_METHODS + ") \"([^\"]*)\" with parameters[:]$")
  public void i_execute_with_parameters( String httpMethodString,
                                         String path,
                                         DataTable dataTable ) throws Throwable {
    HttpMethod httpMethod = HttpMethod.valueOf( StringUtils.upperCase( httpMethodString ) );

    UriComponentsBuilder uri = UriComponentsBuilder.fromUriString( restUrlBuilder.build( path ) );

    HttpHeaders headers = new HttpHeaders();
    if ( Arrays.asList( HttpMethod.POST, HttpMethod.PUT ).contains( httpMethod ) ) {
View Full Code Here

    Yaml yaml = new Yaml();

    String spelData = spel.replaceExpressions( data );
    Object instance = yaml.load( spelData );

    HttpMethod httpMethod = HttpMethod.valueOf( StringUtils.upperCase( httpMethodString ) );

    UriComponentsBuilder uri = UriComponentsBuilder.fromUriString( restUrlBuilder.build( path ) );

    HttpHeaders headers = new HttpHeaders();
    headers.setContentType( MediaType.APPLICATION_JSON );
View Full Code Here

    boolean supportsHttpMethod = ReflectionUtils.requestmapClassSupportsHttpMethod();

    for (Object requestmap : ReflectionUtils.loadAllRequestmaps()) {
      String urlPattern = ReflectionUtils.getRequestmapUrl(requestmap);
      String configAttribute = ReflectionUtils.getRequestmapConfigAttribute(requestmap);
      HttpMethod method = supportsHttpMethod ? ReflectionUtils.getRequestmapHttpMethod(requestmap) : null;
      data.add(new InterceptedUrl(urlPattern, split(configAttribute), method));
    }

    return data;
  }
View Full Code Here

    for (Map.Entry<String, List<InterceptedUrl>> controllerEntry : map.entrySet()) {
      String controllerName = controllerEntry.getKey();
      for (InterceptedUrl iu : controllerEntry.getValue()) {
        Collection<ConfigAttribute> configAttributes = iu.getConfigAttributes();
        String actionName = iu.getPattern();
        HttpMethod method = iu.getHttpMethod();
        storeMapping(controllerName, actionName, configAttributes, false, method);
        if (actionName.endsWith("Flow")) {
          // WebFlow actions end in Flow but are accessed without the suffix, so guard both
          storeMapping(controllerName, actionName.substring(0, actionName.length() - 4), configAttributes, false, method);
        }
View Full Code Here

      String controllerName = controllerEntry.getKey();
      List<InterceptedUrl> actionClosures = controllerEntry.getValue();
      for (InterceptedUrl iu : actionClosures) {
        String actionName = iu.getPattern();
        Class<?> closureClass = iu.getClosureClass();
        HttpMethod method = iu.getHttpMethod();
        storeMapping(controllerName, actionName, closureClass, method);
        if (actionName.endsWith("Flow")) {
          // WebFlow actions end in Flow but are accessed without the suffix, so guard both
          storeMapping(controllerName, actionName.substring(0, actionName.length() - 4), closureClass, method);
        }
View Full Code Here

    return cleaned;
  }

  protected void compileAndStoreMapping(InterceptedUrl iu) {
    String pattern = iu.getPattern();
    HttpMethod method = iu.getHttpMethod();

    String key = pattern.toLowerCase();

    Collection<ConfigAttribute> configAttributes = iu.getConfigAttributes();
View Full Code Here

TOP

Related Classes of org.springframework.http.HttpMethod

Copyright © 2018 www.massapicom. 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.