Codota Logo
OkUrlFactory.<init>
Code IndexAdd Codota to your IDE (free)

How to use
okhttp3.OkUrlFactory
constructor

Best Java code snippets using okhttp3.OkUrlFactory.<init> (Showing top 9 results out of 315)

  • Common ways to obtain OkUrlFactory
private void myMethod () {
OkUrlFactory o =
  • Codota IconOkHttpClient client;new OkUrlFactory(client)
  • Smart code suggestions by Codota
}
origin: square/okhttp

/**
 * Returns a copy of this stream handler factory that includes a shallow copy of the internal
 * {@linkplain OkHttpClient HTTP client}.
 */
@Override public OkUrlFactory clone() {
 return new OkUrlFactory(client);
}
origin: com.github.ljun20160606/okhttp-urlconnection

/**
 * Returns a copy of this stream handler factory that includes a shallow copy of the internal
 * {@linkplain OkHttpClient HTTP client}.
 */
@Override public OkUrlFactory clone() {
 return new OkUrlFactory(client);
}
origin: com.squareup.okhttp3/okhttp-urlconnection

/**
 * Returns a copy of this stream handler factory that includes a shallow copy of the internal
 * {@linkplain OkHttpClient HTTP client}.
 */
@Override public OkUrlFactory clone() {
 return new OkUrlFactory(client);
}
origin: apache/servicemix-bundles

/**
 * Returns a copy of this stream handler factory that includes a shallow copy of the internal
 * {@linkplain OkHttpClient HTTP client}.
 */
@Override public OkUrlFactory clone() {
 return new OkUrlFactory(client);
}
origin: cloudant/java-cloudant

@Override
public HttpURLConnection openConnection(URL url) throws IOException {
  if (factory == null) {
    factory = new OkUrlFactory(clientBuilder.build());
  }
  return factory.open(url);
}
origin: fullcontact/fullcontact4j

public FCUrlClient(String userAgent, Map<String, String> customHeaders, OkHttpClient client, String apiKey) {
  okUrlFactory = new OkUrlFactory(client);
  if(customHeaders != null) {
    this.headers = customHeaders;
  }
  //disallow api key, token, or user agent headers to be supplied by the user
  boolean removedBlocked = headers.remove(FCConstants.HEADER_AUTH_API_KEY) != null;
  removedBlocked |= headers.remove(FCConstants.HEADER_AUTH_ACCESS_TOKEN) != null;
  if(removedBlocked) {
    Utils.info("Custom FullContact header for api key or access token was supplied. It has been ignored.");
  }
  this.userAgent = userAgent;
  this.apiKey = apiKey;
}
origin: jenkins-infra/update-center2

private void retrieveRepositoryNames() throws IOException {
  System.err.println("Retrieving GitHub repository names...");
  Cache cache = new Cache(GITHUB_API_CACHE, 20L*1024*1024); // 20 MB cache
  github = new GitHubBuilder().withConnector(new OkHttp3Connector(new OkUrlFactory(new OkHttpClient.Builder().cache(cache).build()))).withPassword(GITHUB_API_USERNAME, GITHUB_API_PASSWORD).build();
  List<String> ret = new ArrayList<>();
  for (GHRepository repo : github.getOrganization("jenkinsci").listRepositories().withPageSize(100)) {
    ret.add(repo.getHtmlUrl().toString());
  }
  Files.write(GITHUB_REPO_LIST.toPath(), ret);
}
origin: tinyMediaManager/tinyMediaManager

HttpURLConnection connection = new OkUrlFactory(TmmHttpClient.getHttpClient()).open(new URL(request));
connection.setDoOutput(true);
connection.setDoInput(true);
origin: org.tinymediamanager.plugins/scraper-opensubtitles

Call c = new Call(methodName, params);
HttpURLConnection http = new OkUrlFactory(client).open(url);
http.setRequestProperty(USER_AGENT, userAgent);
http.setRequestMethod(HTTP_POST);
okhttp3OkUrlFactory<init>

Popular methods of OkUrlFactory

  • open
  • client
  • setClient

Popular in Java

  • Finding current android device location
  • addToBackStack (FragmentTransaction)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • orElseThrow (Optional)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • PrintStream (java.io)
    A PrintStream adds functionality to another output stream, namely the ability to print representatio
  • Socket (java.net)
    Provides a client-side TCP socket.
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Timer (java.util)
    A facility for threads to schedule tasks for future execution in a background thread. Tasks may be s
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
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