Package com.atlassian.httpclient.api

Examples of com.atlassian.httpclient.api.ResponsePromise


    return post(uriBuilder.build(), worklogInput, new WorklogInputJsonGenerator());
  }

  private Promise<Void> postAttachments(final URI attachmentsUri, final MultipartEntity multipartEntity) {
    final ResponsePromise responsePromise = client()
        .newRequest(attachmentsUri)
        .setEntity(new MultiPartEntityBuilder(multipartEntity))
        .setHeader("X-Atlassian-Token", "nocheck")
        .post();
    return call(responsePromise);
View Full Code Here


    return callAndParse(client.newRequest(uri).get(), parser);
  }

  protected final <I, T> Promise<T> postAndParse(final URI uri, I entity, final JsonGenerator<I> jsonGenerator,
      final JsonObjectParser<T> parser) {
    final ResponsePromise responsePromise = client.newRequest(uri)
        .setEntity(toEntity(jsonGenerator, entity))
        .post();
    return callAndParse(responsePromise, parser);
  }
View Full Code Here

        .post();
    return callAndParse(responsePromise, parser);
  }

  protected final <T> Promise<T> postAndParse(final URI uri, final JSONObject entity, final JsonObjectParser<T> parser) {
    final ResponsePromise responsePromise = client.newRequest(uri)
        .setEntity(entity.toString())
        .setContentType(JSON_CONTENT_TYPE)
        .post();
    return callAndParse(responsePromise, parser);
  }
View Full Code Here

        .post();
    return callAndParse(responsePromise, parser);
  }

  protected final Promise<Void> post(final URI uri, final String entity) {
    final ResponsePromise responsePromise = client.newRequest(uri)
        .setEntity(entity)
        .setContentType(JSON_CONTENT_TYPE)
        .post();
    return call(responsePromise);
  }
View Full Code Here

  protected final Promise<Void> post(final URI uri, final JSONObject entity) {
    return post(uri, entity.toString());
  }

  protected final <T> Promise<Void> post(final URI uri, final T entity, final JsonGenerator<T> jsonGenerator) {
    final ResponsePromise responsePromise = client.newRequest(uri)
        .setEntity(toEntity(jsonGenerator, entity))
        .post();
    return call(responsePromise);
  }
View Full Code Here

    return post(uri, StringUtils.EMPTY);
  }

  protected final <I, T> Promise<T> putAndParse(final URI uri, I entity, final JsonGenerator<I> jsonGenerator,
      final JsonObjectParser<T> parser) {
    final ResponsePromise responsePromise = client.newRequest(uri)
        .setEntity(toEntity(jsonGenerator, entity))
        .put();
    return callAndParse(responsePromise, parser);
  }
View Full Code Here

        .put();
    return callAndParse(responsePromise, parser);
  }

  protected final Promise<Void> delete(final URI uri) {
    final ResponsePromise responsePromise = client.newRequest(uri).delete();
    return call(responsePromise);
  }
View Full Code Here

    return callAndParse(client.newRequest(uri).get(), parser);
  }

  protected final <I, T> Promise<T> postAndParse(final URI uri, I entity, final JsonGenerator<I> jsonGenerator,
      final JsonObjectParser<T> parser) {
    final ResponsePromise responsePromise = client.newRequest(uri)
        .setEntity(toEntity(jsonGenerator, entity))
        .post();
    return callAndParse(responsePromise, parser);
  }
View Full Code Here

        .post();
    return callAndParse(responsePromise, parser);
  }

  protected final <T> Promise<T> postAndParse(final URI uri, final JSONObject entity, final JsonObjectParser<T> parser) {
    final ResponsePromise responsePromise = client.newRequest(uri)
        .setEntity(entity.toString())
        .setContentType(JSON_CONTENT_TYPE)
        .post();
    return callAndParse(responsePromise, parser);
  }
View Full Code Here

        .post();
    return callAndParse(responsePromise, parser);
  }

  protected final Promise<Void> post(final URI uri, final String entity) {
    final ResponsePromise responsePromise = client.newRequest(uri)
        .setEntity(entity)
        .setContentType(JSON_CONTENT_TYPE)
        .post();
    return call(responsePromise);
  }
View Full Code Here

TOP

Related Classes of com.atlassian.httpclient.api.ResponsePromise

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.