- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for Leider (0.16 sec)
-
samples/guide/src/main/java/okhttp3/recipes/PostMultipart.java
RequestBody.create( new File("docs/images/logo-square.png"), MEDIA_TYPE_PNG)) .build(); Request request = new Request.Builder() .header("Authorization", "Client-ID " + IMGUR_CLIENT_ID) .url("https://api.imgur.com/3/image") .post(requestBody) .build(); try (Response response = client.newCall(request).execute()) {
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jun 24 12:59:42 GMT 2019 - 2.2K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/PreemptiveAuth.java
} @Override public Response intercept(Chain chain) throws IOException { Request request = chain.request(); if (request.url().host().equals(host)) { request = request.newBuilder() .header("Authorization", credentials) .build(); } return chain.proceed(request); } }
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Nov 05 07:46:46 GMT 2018 - 2.1K bytes - Viewed (0) -
samples/crawler/src/main/java/okhttp3/sample/Crawler.java
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Thu Aug 12 07:26:27 GMT 2021 - 4.6K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/RewriteResponseCacheControl.java
public final class RewriteResponseCacheControl { /** Dangerous interceptor that rewrites the server's cache-control header. */ private static final Interceptor REWRITE_CACHE_CONTROL_INTERCEPTOR = chain -> { Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .header("Cache-Control", "max-age=60") .build(); }; private final OkHttpClient client;
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Jan 12 03:31:36 GMT 2019 - 2.6K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/RequestBodyCompression.java
Request originalRequest = chain.request(); if (originalRequest.body() == null || originalRequest.header("Content-Encoding") != null) { return chain.proceed(originalRequest); } Request compressedRequest = originalRequest.newBuilder() .header("Content-Encoding", "gzip") .method(originalRequest.method(), gzip(originalRequest.body())) .build();
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat May 25 18:02:55 GMT 2019 - 3.8K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/AccessHeaders.java
if (!response.isSuccessful()) throw new IOException("Unexpected code " + response); System.out.println("Server: " + response.header("Server")); System.out.println("Date: " + response.header("Date")); System.out.println("Vary: " + response.headers("Vary")); } } public static void main(String... args) throws Exception { new AccessHeaders().run(); }
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun May 22 01:29:42 GMT 2016 - 1.6K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/Authenticate.java
public final class Authenticate { private final OkHttpClient client; public Authenticate() { client = new OkHttpClient.Builder() .authenticator((route, response) -> { if (response.request().header("Authorization") != null) { return null; // Give up, we've already attempted to authenticate. } System.out.println("Authenticating for response: " + response);
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Thu Aug 12 07:26:27 GMT 2021 - 1.9K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/CurrentDateHeader.java
.url("https://publicobject.com/helloworld.txt") .build(); try (Response response = client.newCall(request).execute()) { System.out.println(response.request().header("Date")); } } static class CurrentDateInterceptor implements Interceptor { @Override public Response intercept(Chain chain) throws IOException { Request request = chain.request();
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Oct 31 15:32:50 GMT 2018 - 1.8K bytes - Viewed (0)