Examples of BaseRequestEntity


Examples of org.apache.abdera.protocol.client.util.BaseRequestEntity

    // Verify the signature with Verisign's "Signed Ping" interop endpoint
    Client client = new CommonsClient();
    RequestOptions reqoptions = client.getDefaultRequestOptions();
    reqoptions.setContentType("application/xml");
    BaseRequestEntity bre = new BaseRequestEntity(entry,false);
    ClientResponse response = client.post(
      "http://verisignlabs.com/tg/verify",
      bre, reqoptions);
    assertEquals(response.getStatus(),200);
    Document<Element> result = response.getDocument();
View Full Code Here

Examples of org.apache.abdera.protocol.client.util.BaseRequestEntity

  public ClientResponse post(
    String uri,
    Base base,
    RequestOptions options) {
      return execute("POST", uri, new BaseRequestEntity(base, options.isUseChunked()), options);
  }
View Full Code Here

Examples of org.apache.abdera.protocol.client.util.BaseRequestEntity

  public ClientResponse put(
      String uri,
      Base base,
      RequestOptions options) {
    return execute("PUT", uri, new BaseRequestEntity(base, options.isUseChunked()), options);
  }
View Full Code Here

Examples of org.apache.abdera.protocol.client.util.BaseRequestEntity

        IRI colUri = new IRI(providerURI).resolve("customer");
        // res = client.post(colUri.toString() + "?test=foo", entry, opts);
        id = eTag.substring( 1, eTag.length()-1);
        // Warning. AbderaClient.put(String uri,Base base,RequestOptions options) caches on the client side.
        // ClientResponse res = client.put(colUri.toString() + id, entry, opts);
        ClientResponse res = client.put(colUri.toString() + "/" + id, new BaseRequestEntity( entry ), opts);
        // Expected Atom server response (item was edited by another user)
        // >      HTTP/1.1 412 Precondition Failed
        //       Date: Sat, 24 Feb 2007 16:34:11 GMT

        // If-Match Assert response status code is 412. Precondition failed.
View Full Code Here

Examples of org.apache.abdera.protocol.client.util.BaseRequestEntity

  public ClientResponse post(
    String uri,
    Base base,
    RequestOptions options) {
      return execute("POST", uri, new BaseRequestEntity(base, options.isUseChunked()), options);
  }
View Full Code Here

Examples of org.apache.abdera.protocol.client.util.BaseRequestEntity

  public ClientResponse put(
      String uri,
      Base base,
      RequestOptions options) {
    return execute("PUT", uri, new BaseRequestEntity(base, options.isUseChunked()), options);
  }
View Full Code Here

Examples of org.apache.abdera.protocol.client.util.BaseRequestEntity

        IRI colUri = new IRI(providerURI).resolve("customer");
        // res = client.post(colUri.toString() + "?test=foo", entry, opts);
        id = eTag.substring( 1, eTag.length()-1);
        // Warning. AbderaClient.put(String uri,Base base,RequestOptions options) caches on the client side.
        // ClientResponse res = client.put(colUri.toString() + id, entry, opts);
        ClientResponse res = client.put(colUri.toString() + "/" + id, new BaseRequestEntity( entry ), opts);
        // Expected Atom server response (item was edited by another user)
        // >      HTTP/1.1 412 Precondition Failed
        //       Date: Sat, 24 Feb 2007 16:34:11 GMT

        // If-Match Assert response status code is 412. Precondition failed.
View Full Code Here

Examples of org.apache.abdera.protocol.client.util.BaseRequestEntity

        Document d = (Document) base;
        if (options.getSlug() == null &&
            d.getSlug() != null)
          options.setSlug(d.getSlug());
      }
      return execute("POST", uri, new BaseRequestEntity(base, options.isUseChunked()), options);
  }
View Full Code Here

Examples of org.apache.abdera.protocol.client.util.BaseRequestEntity

          options.setIfMatch(d.getEntityTag());
        else if (d.getLastModified() != null)
          options.setIfUnmodifiedSince(d.getLastModified());
      }
    }
    return execute("PUT", uri, new BaseRequestEntity(base, options.isUseChunked()), options);
  }
View Full Code Here

Examples of org.apache.abdera.protocol.client.util.BaseRequestEntity

    Base base,
    RequestOptions options) {
      return execute(
        method,
        uri,
        new BaseRequestEntity(base),
        options);
  }
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.