Codota Logo
Request$Builder.setAccept
Code IndexAdd Codota to your IDE (free)

How to use
setAccept
method
in
com.atlassian.httpclient.api.Request$Builder

Best Java code snippets using com.atlassian.httpclient.api.Request$Builder.setAccept (Showing top 2 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
origin: com.atlassian.plugins/atlassian-connect-core

private DownloadResult<ResponsePromise> scheduleDownload(Language language, String baseUrl, String path) {
  URI uriToDownload = resolveUri(baseUrl, path);
  ResponsePromise responsePromise = httpClient
      .newRequest(uriToDownload)
      .setAccept(MediaType.APPLICATION_JSON)
      .get();
  return new DownloadResult<>(language, uriToDownload, responsePromise);
}
origin: com.atlassian.jira/jira-rest-java-client-core

protected final <T> Promise<T> getAndParse(final URI uri, final JsonParser<?, T> parser) {
  return callAndParse(client.newRequest(uri).setAccept("application/json").get(), parser);
}
com.atlassian.httpclient.apiRequest$BuildersetAccept

Javadoc

Sets the Accept header for the request.

Popular methods of Request$Builder

  • setContentType
  • execute
    Executes this request through the HttpClient service using the given HTTP method.
  • get
    Executes this request through the HttpClient service as a GET operation. The request SHOULD NOT cont
  • setEntity
  • setEntityStream
  • setHeader
  • setAttribute
    Sets an attribute on the request. Attributes are request metadata that are forwarded to the analytic
  • setAttributes
    Sets attributes on the request. Attributes are request metadata that are forwarded to the analytics
  • setHeaders
  • setUri
    Sets this request's URI. Must not be null by the time the request is executed.
  • delete
    Executes this request through the HttpClient service as a DELETE operation. The request SHOULD NOT c
  • post
    Executes this request through the HttpClient service as a POST operation. The request SHOULD contain
  • delete,
  • post,
  • put,
  • setCacheDisabled

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getSharedPreferences (Context)
  • getExternalFilesDir (Context)
  • addToBackStack (FragmentTransaction)
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • List (java.util)
    A List is a collection which maintains an ordering for its elements. Every element in the List has a
  • SortedSet (java.util)
    A Set that further provides a total ordering on its elements. The elements are ordered using their C
  • Stack (java.util)
    The Stack class represents a last-in-first-out (LIFO) stack of objects. It extends class Vector with
  • Collectors (java.util.stream)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now