- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for berate (0.16 sec)
-
samples/guide/src/main/java/okhttp3/recipes/PostFile.java
public void run() throws Exception { File file = new File("README.md"); Request request = new Request.Builder() .url("https://api.github.com/markdown/raw") .post(RequestBody.create(file, MEDIA_TYPE_MARKDOWN)) .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: Sat May 25 18:02:55 GMT 2019 - 1.5K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/HttpsServer.java
import okhttp3.Response; import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; import okhttp3.tls.HandshakeCertificates; import okhttp3.tls.HeldCertificate; /** * Create an HTTPS server with a self-signed certificate that OkHttp trusts. */ public class HttpsServer { public void run() throws Exception { HeldCertificate localhostCertificate = new HeldCertificate.Builder()
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 02 14:04:37 GMT 2023 - 2.1K bytes - Viewed (0) -
samples/slack/src/main/java/okhttp3/slack/SlackApi.java
import okhttp3.WebSocketListener; import okio.ByteString; /** * API access to the <a href="https://api.slack.com/apps">Slack API</a> as an application. One * instance of this class may operate without a user, or on behalf of many users. Use the Slack API * dashboard to create a client ID and secret for this application. * * <p>You must configure your Slack API OAuth and Permissions page with a localhost URL like {@code
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Fri Jul 06 19:30:55 GMT 2018 - 4.4K bytes - Viewed (1) -
samples/unixdomainsockets/src/main/java/okhttp3/unixdomainsockets/ClientAndServer.java
import okhttp3.OkHttpClient; import okhttp3.Protocol; import okhttp3.Request; import okhttp3.Response; import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; /** * Create UNIX domain sockets for MockWebServer and OkHttp and connect 'em together. Note that we * cannot do TLS over domain sockets. */ public class ClientAndServer { public void run() throws Exception {
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Dec 24 03:46:30 GMT 2018 - 2.1K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/PostMultipart.java
RequestBody requestBody = new MultipartBody.Builder() .setType(MultipartBody.FORM) .addFormDataPart("title", "Square Logo") .addFormDataPart("image", "logo-square.png", 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)
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/guide/PostExample.java
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(); try (Response response = client.newCall(request).execute()) { return response.body().string();
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/guide/src/main/java/okhttp3/recipes/PrintEvents.java
private static final class PrintingEventListener extends EventListener { private static final Factory FACTORY = new Factory() { final AtomicLong nextCallId = new AtomicLong(1L); @Override public EventListener create(Call call) { long callId = nextCallId.getAndIncrement(); System.out.printf("%04d %s%n", callId, call.request().url()); return new PrintingEventListener(callId, System.nanoTime()); } };
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Feb 16 23:20:49 GMT 2020 - 6.1K bytes - Viewed (0) -
samples/simple-client/src/main/java/okhttp3/sample/OkHttpContributors.java
static class Contributor { String login; int contributions; } public static void main(String... args) throws Exception { OkHttpClient client = new OkHttpClient(); // Create request for remote resource. Request request = new Request.Builder() .url(ENDPOINT) .build(); // Execute the request and retrieve the response.
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/RequestBodyCompression.java
Map<String, String> requestBody = new LinkedHashMap<>(); requestBody.put("longUrl", "https://publicobject.com/2014/12/04/html-formatting-javadocs/"); RequestBody jsonRequestBody = RequestBody.create( mapJsonAdapter.toJson(requestBody), MEDIA_TYPE_JSON); Request request = new Request.Builder() .url("https://www.googleapis.com/urlshortener/v1/url?key=" + GOOGLE_API_KEY) .post(jsonRequestBody)
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/PostString.java
+ " * _1.1_ June 15, 2013\n" + " * _1.2_ August 11, 2013\n"; Request request = new Request.Builder() .url("https://api.github.com/markdown/raw") .post(RequestBody.create(postBody, MEDIA_TYPE_MARKDOWN)) .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: Sat May 25 18:02:55 GMT 2019 - 1.7K bytes - Viewed (0)