Search Options

Results per page
Sort
Preferred Languages
Advance

Results 231 - 240 of 1,772 for request (0.08 sec)

  1. okhttp-sse/src/main/kotlin/okhttp3/sse/EventSources.kt

      @JvmStatic
      fun createFactory(callFactory: Call.Factory): EventSource.Factory {
        return EventSource.Factory { request, listener ->
          val actualRequest =
            if (request.header("Accept") == null) {
              request.newBuilder().addHeader("Accept", "text/event-stream").build()
            } else {
              request
            }
    
          RealEventSource(actualRequest, listener).apply {
            connect(callFactory)
          }
        }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Apr 06 04:18:15 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  2. regression-test/src/androidTest/java/okhttp/regression/compare/OkHttpClientTest.java

    @RunWith(AndroidJUnit4.class)
    public class OkHttpClientTest {
      @Test public void get() throws IOException {
        OkHttpClient client = new OkHttpClient();
        Request request = new Request.Builder()
            .url("https://google.com/robots.txt")
            .build();
        try (Response response = client.newCall(request).execute()) {
          assertEquals(200, response.code());
          assertEquals(Protocol.HTTP_2, response.protocol());
        }
      }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Nov 14 17:38:22 UTC 2020
    - 1.4K bytes
    - Viewed (0)
  3. samples/guide/src/main/java/okhttp3/recipes/ConfigureTimeouts.java

            .callTimeout(10, TimeUnit.SECONDS)
            .build();
      }
    
      public void run() throws Exception {
        Request request = new Request.Builder()
            .url("http://httpbin.org/delay/2") // This URL is served with a 2 second delay.
            .build();
    
        try (Response response = client.newCall(request).execute()) {
          System.out.println("Response completed: " + response);
        }
      }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Sep 28 18:00:26 UTC 2019
    - 1.5K bytes
    - Viewed (0)
  4. samples/guide/src/main/java/okhttp3/recipes/SynchronousGet.java

    import okhttp3.OkHttpClient;
    import okhttp3.Request;
    import okhttp3.Response;
    
    public final class SynchronousGet {
      private final OkHttpClient client = new OkHttpClient();
    
      public void run() throws Exception {
        Request request = new Request.Builder()
            .url("https://publicobject.com/helloworld.txt")
            .build();
    
        try (Response response = client.newCall(request).execute()) {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun May 22 01:29:42 UTC 2016
    - 1.5K bytes
    - Viewed (0)
  5. compat/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java

                            EMPTY,
                            request);
                }
    
                validateRawRepositories(problems, m.getRepositories(), "repositories.repository.", EMPTY, request);
    
                validateRawRepositories(
                        problems, m.getPluginRepositories(), "pluginRepositories.pluginRepository.", EMPTY, request);
    
                Build build = m.getBuild();
                if (build != null) {
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 77.1K bytes
    - Viewed (0)
  6. samples/guide/src/main/java/okhttp3/recipes/PostForm.java

    import okhttp3.OkHttpClient;
    import okhttp3.Request;
    import okhttp3.RequestBody;
    import okhttp3.Response;
    
    public final class PostForm {
      private final OkHttpClient client = new OkHttpClient();
    
      public void run() throws Exception {
        RequestBody formBody = new FormBody.Builder()
            .add("search", "Jurassic Park")
            .build();
        Request request = new Request.Builder()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun May 22 01:29:42 UTC 2016
    - 1.4K bytes
    - Viewed (0)
  7. okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsOverHttps.kt

        results: MutableList<InetAddress>,
        failures: MutableList<Exception>,
        type: Int,
      ) {
        val request = buildRequest(hostname, type)
        val response = getCacheOnlyResponse(request)
    
        response?.let { processResponse(it, hostname, results, failures) } ?: networkRequests.add(
          client.newCall(request),
        )
      }
    
      private fun executeRequests(
        hostname: String,
        networkRequests: List<Call>,
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Thu Oct 31 09:27:31 UTC 2024
    - 9.8K bytes
    - Viewed (0)
  8. src/main/java/jcifs/internal/CommonServerMessageBlockRequest.java

     */
    package jcifs.internal;
    
    
    import jcifs.util.transport.Request;
    
    
    /**
     * @author mbechler
     *
     */
    public interface CommonServerMessageBlockRequest extends CommonServerMessageBlock, Request {
    
        /**
         * @return request was handled asynchronously
         */
        boolean isResponseAsync ();
    
    
        /**
         * 
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Sun Jul 01 13:12:10 UTC 2018
    - 1.8K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/RecordedResponse.kt

     */
    class RecordedResponse(
      @JvmField val request: Request,
      val response: Response?,
      val webSocket: WebSocket?,
      val body: String?,
      val failure: IOException?,
    ) {
      fun assertRequestUrl(url: HttpUrl) =
        apply {
          assertThat(request.url).isEqualTo(url)
        }
    
      fun assertRequestMethod(method: String) =
        apply {
          assertThat(request.method).isEqualTo(method)
        }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  10. docs/pt/docs/tutorial/middleware.md

    ///
    
    ## Criar um middleware
    
    Para criar um middleware, use o decorador `@app.middleware("http")` logo acima de uma função.
    
    A função middleware recebe:
    
    * A `request`.
    * Uma função `call_next` que receberá o `request` como um parâmetro.
        * Esta função passará a `request` para a *operação de rota* correspondente.
        * Então ela retorna a `response` gerada pela *operação de rota* correspondente.
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 3.2K bytes
    - Viewed (0)
Back to top