- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for jsou (0.19 sec)
-
samples/guide/src/main/java/okhttp3/guide/PostExample.java
import okhttp3.RequestBody; import okhttp3.Response; public class PostExample { public static final MediaType JSON = MediaType.get("application/json; charset=utf-8"); final OkHttpClient client = new OkHttpClient(); String post(String url, String json) throws IOException { RequestBody body = RequestBody.create(json, JSON); Request request = new Request.Builder() .url(url) .post(body) .build();
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Fri Apr 05 03:30:42 GMT 2024 - 2K bytes - Viewed (0) -
samples/crawler/src/main/java/okhttp3/sample/Crawler.java
import okhttp3.Cache; import okhttp3.HttpUrl; import okhttp3.MediaType; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; /** * Fetches HTML from a requested URL, follows the links, and repeats. */ public final class Crawler { private final OkHttpClient client;
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/RequestBodyCompression.java
* * https://console.developers.google.com/project */ public static final String GOOGLE_API_KEY = "AIzaSyAx2WZYe0My0i-uGurpvraYJxO7XNbwiGs"; public static final MediaType MEDIA_TYPE_JSON = MediaType.get("application/json"); private final OkHttpClient client = new OkHttpClient.Builder() .addInterceptor(new GzipRequestInterceptor()) .build(); private final Moshi moshi = new Moshi.Builder().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/simple-client/src/main/java/okhttp3/sample/OkHttpContributors.java
private static final String ENDPOINT = "https://api.github.com/repos/square/okhttp/contributors"; private static final Moshi MOSHI = new Moshi.Builder().build(); private static final JsonAdapter<List<Contributor>> CONTRIBUTORS_JSON_ADAPTER = MOSHI.adapter( Types.newParameterizedType(List.class, Contributor.class)); static class Contributor { String login; int contributions; }
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Fri Apr 05 03:30:42 GMT 2024 - 2.2K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/AccessHeaders.java
.url("https://api.github.com/repos/square/okhttp/issues") .header("User-Agent", "OkHttp Headers.java") .addHeader("Accept", "application/json; q=0.5") .addHeader("Accept", "application/vnd.github.v3+json") .build(); try (Response response = client.newCall(request).execute()) { if (!response.isSuccessful()) throw new IOException("Unexpected code " + response);
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)