Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for ResponseCode (0.22 sec)

  1. internal/dsync/lock-args_gen.go

    	return
    }
    
    // DecodeMsg implements msgp.Decodable
    func (z *ResponseCode) DecodeMsg(dc *msgp.Reader) (err error) {
    	{
    		var zb0001 uint8
    		zb0001, err = dc.ReadUint8()
    		if err != nil {
    			err = msgp.WrapError(err)
    			return
    		}
    		(*z) = ResponseCode(zb0001)
    	}
    	return
    }
    
    // EncodeMsg implements msgp.Encodable
    func (z ResponseCode) EncodeMsg(en *msgp.Writer) (err error) {
    	err = en.WriteUint8(uint8(z))
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 9.5K bytes
    - Viewed (0)
  2. mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt

        val url = server.url("/").toUrl()
        val connection = url.openConnection() as HttpURLConnection
        assertThat(connection.responseCode).isEqualTo(HttpURLConnection.HTTP_OK)
        val refusedConnection = url.openConnection() as HttpURLConnection
        assertFailsWith<ConnectException> {
          refusedConnection.responseCode
        }.also { expected ->
          assertThat(expected.message!!).contains("refused")
        }
      }
    
      @Test
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 23.5K bytes
    - Viewed (0)
  3. internal/dsync/lock-args.go

    	Quorum int
    }
    
    // ResponseCode is the response code for a locking request.
    type ResponseCode uint8
    
    // Response codes for a locking request.
    const (
    	RespOK ResponseCode = iota
    	RespLockConflict
    	RespLockNotInitialized
    	RespLockNotFound
    	RespErr
    )
    
    // LockResp is a locking request response.
    type LockResp struct {
    	Code ResponseCode
    	Err  string
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Jan 18 04:34:26 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/http/HttpHeaders.kt

      // HEAD requests never yield a body regardless of the response headers.
      if (request.method == "HEAD") {
        return false
      }
    
      val responseCode = code
      if ((responseCode < HTTP_CONTINUE || responseCode >= 200) &&
        responseCode != HTTP_NO_CONTENT &&
        responseCode != HTTP_NOT_MODIFIED
      ) {
        return true
      }
    
      // If the Content-Length or Transfer-Encoding headers disagree with the response code, the
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/http/RetryAndFollowUpInterceptor.kt

        if (HttpMethod.permitsRequestBody(method)) {
          val responseCode = userResponse.code
          val maintainBody =
            HttpMethod.redirectsWithBody(method) ||
              responseCode == HTTP_PERM_REDIRECT ||
              responseCode == HTTP_TEMP_REDIRECT
          if (HttpMethod.redirectsToGet(method) && responseCode != HTTP_PERM_REDIRECT && responseCode != HTTP_TEMP_REDIRECT) {
            requestBuilder.method("GET", null)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 15 13:24:48 GMT 2024
    - 12.1K bytes
    - Viewed (4)
  6. mockwebserver/src/test/java/mockwebserver3/CustomDispatcherTest.kt

      }
    
      private fun buildRequestThread(
        path: String,
        responseCode: AtomicInteger,
      ): Thread {
        return Thread {
          val url = mockWebServer.url(path).toUrl()
          val conn: HttpURLConnection
          try {
            conn = url.openConnection() as HttpURLConnection
            responseCode.set(conn.responseCode) // Force the connection to hit the "server".
          } catch (ignored: IOException) {
          }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.3K bytes
    - Viewed (0)
  7. samples/crawler/src/main/java/okhttp3/sample/Crawler.java

              + " over "
              + response.protocol()
              + ")") : "(cache)";
          int responseCode = response.code();
    
          System.out.printf("%03d: %s %s%n", responseCode, url, responseSource);
    
          String contentType = response.header("Content-Type");
          if (responseCode != 200 || contentType == null) {
            return;
          }
    
          MediaType mediaType = MediaType.parse(contentType);
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Thu Aug 12 07:26:27 GMT 2021
    - 4.6K bytes
    - Viewed (0)
  8. okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsRecordCodec.kt

        buf.readShort() // query id
    
        val flags = buf.readShort().toInt() and 0xffff
        require(flags shr 15 != 0) { "not a response" }
    
        val responseCode = flags and 0xf
    
        if (responseCode == NXDOMAIN) {
          throw UnknownHostException("$hostname: NXDOMAIN")
        } else if (responseCode == SERVFAIL) {
          throw UnknownHostException("$hostname: SERVFAIL")
        }
    
        val questionCount = buf.readShort().toInt() and 0xffff
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  9. regression-test/src/androidTest/java/okhttp/regression/compare/AndroidHttpEngineTest.kt

        val text =
          conn.inputStream.use {
            it.bufferedReader().readText()
          }
    
        assertEquals(200, conn.responseCode)
    
        assertTrue(text.contains("Disallow"))
      }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Mar 24 13:19:43 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/CacheTest.kt

      private fun assertCached(
        shouldWriteToCache: Boolean,
        responseCode: Int,
      ) {
        var expectedResponseCode = responseCode
        server = MockWebServer()
        val builder =
          MockResponse.Builder()
            .addHeader("Last-Modified: " + formatDate(-1, TimeUnit.HOURS))
            .addHeader("Expires: " + formatDate(1, TimeUnit.HOURS))
            .code(responseCode)
            .body("ABCDE")
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 108.6K bytes
    - Viewed (0)
Back to top