Examples of HttpDelete


Examples of org.apache.http.client.methods.HttpDelete

      HttpPost method = new HttpPost(uri);
      method = (HttpPost) prepareMethodWithUpdatedContent(method, request);
      ProxyProfiler.profileTimedRequest(timedObject, "create HttpPost");
      return method;
    } else if (smethod.equalsIgnoreCase("delete")) {
      HttpDelete method = new HttpDelete(uri);
      ProxyProfiler.profileTimedRequest(timedObject, "create HttpDelete");
      return method;
    } else if (smethod.equalsIgnoreCase("head")) {
      HttpHead method = new HttpHead(uri);
      ProxyProfiler.profileTimedRequest(timedObject, "create HttpHead");
View Full Code Here

Examples of org.apache.http.client.methods.HttpDelete

      {
         return new HttpPost(url);
      }
      else if ("DELETE".equals(restVerb))
      {
         return new HttpDelete(url);
      }
      else
      {
         final String verb = restVerb;
         return new HttpPost(url)
View Full Code Here

Examples of org.apache.http.client.methods.HttpDelete

      {
         return new HttpPost(url);
      }
      else if ("DELETE".equals(restVerb))
      {
         return new HttpDelete(url);
      }
      else
      {
         final String verb = restVerb;
         return new HttpPost(url)
View Full Code Here

Examples of org.apache.http.client.methods.HttpDelete

        String r = configClient.replacePath("/setAllowCredentials/false")
            .accept("text/plain").post(null, String.class);
        assertEquals("ok", r);
       
        HttpClient httpclient = new DefaultHttpClient();
        HttpDelete httpdelete = new HttpDelete("http://localhost:" + PORT + "/untest/delete");
        httpdelete.addHeader("Origin", "http://localhost:" + PORT);

        HttpResponse response = httpclient.execute(httpdelete);
        assertEquals(200, response.getStatusLine().getStatusCode());
        assertAllowCredentials(response, false);
        assertOriginResponse(true, null, true, response);
View Full Code Here

Examples of org.apache.http.client.methods.HttpDelete

    public void deleteUser(String username) {
        if (username.startsWith(GROUP_PREFIX)) {
            throw new IllegalArgumentException("Group prefix " + GROUP_PREFIX + " not permitted with Syncope backend");
        }
        HttpDelete request = new HttpDelete(address + "/users/" + username);
        try {
            client.execute(request);
        } catch (Exception e) {
            logger.error("Can't delete user {}", username, e);
            throw new RuntimeException("Can't delete user " + username, e);
View Full Code Here

Examples of org.apache.http.client.methods.HttpDelete

      } else if ("GET".equals(methodType)) {
        httpMethod = new HttpGet(requestUri);
      } else if ("HEAD".equals(methodType)) {
        httpMethod = new HttpHead(requestUri);
      } else if ("DELETE".equals(methodType)) {
        httpMethod = new HttpDelete(requestUri);
      }
      for (Map.Entry<String, List<String>> entry : request.getHeaders().entrySet()) {
        httpMethod.addHeader(entry.getKey(), StringUtils.join(entry.getValue(), ','));
      }
View Full Code Here

Examples of org.apache.http.client.methods.HttpDelete

            } else if (method.equalsIgnoreCase(Method.PUT.getName())) {
                this.httpRequest = new HttpPut(requestUri);
            } else if (method.equalsIgnoreCase(Method.HEAD.getName())) {
                this.httpRequest = new HttpHead(requestUri);
            } else if (method.equalsIgnoreCase(Method.DELETE.getName())) {
                this.httpRequest = new HttpDelete(requestUri);
            } else if (method.equalsIgnoreCase(Method.OPTIONS.getName())) {
                this.httpRequest = new HttpOptions(requestUri);
            } else if (method.equalsIgnoreCase(Method.TRACE.getName())) {
                this.httpRequest = new HttpTrace(requestUri);
            } else {
View Full Code Here

Examples of org.apache.http.client.methods.HttpDelete

    if (Transfer.PUT_METHOD.equalsIgnoreCase(method))
      return new HttpPut(url);
    if (Transfer.GET_METHOD.equalsIgnoreCase(method))
      return new HttpGet(url);
    if (Transfer.DELETE_METHOD.equalsIgnoreCase(method))
      return new HttpDelete(url);
    if (Transfer.HEAD_METHOD.equalsIgnoreCase(method))
      return new HttpHead(url);
    throw new IllegalArgumentException("un supported http method: " + method);
  }
View Full Code Here

Examples of org.apache.http.client.methods.HttpDelete

  {
    super(config, client);
    try
    {
      String idField = java.net.URLEncoder.encode(documentURI,"utf-8");
      HttpDelete method = new HttpDelete(config.getServerLocation() +
          "/" + config.getIndexName() + "/" + config.getIndexType()
          + "/" + idField);
      call(method);
      if ("ok".equals(jsonStatus))
        return;
View Full Code Here

Examples of org.apache.http.client.methods.HttpDelete

    public static Request Trace(final String uri) {
        return new Request(new HttpTrace(uri));
    }

    public static Request Delete(final URI uri) {
        return new Request(new HttpDelete(uri));
    }
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.