Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1681 - 1690 of 1,950 for func (0.12 sec)

  1. samples/guide/src/main/java/okhttp3/recipes/kt/ParseResponseWithMoshi.kt

    import okhttp3.Request
    
    class ParseResponseWithMoshi {
      private val client = OkHttpClient()
      private val moshi = Moshi.Builder().build()
      private val gistJsonAdapter = moshi.adapter(Gist::class.java)
    
      fun run() {
        val request =
          Request.Builder()
            .url("https://api.github.com/gists/c2a7c39532239ff261be")
            .build()
        client.newCall(request).execute().use { response ->
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  2. tests/test_ws_dependencies.py

    
    def dependency_list() -> List[str]:
        return []
    
    
    DepList = Annotated[List[str], Depends(dependency_list)]
    
    
    def create_dependency(name: str):
        def fun(deps: DepList):
            deps.append(name)
    
        return Depends(fun)
    
    
    router = APIRouter(dependencies=[create_dependency("router")])
    prefix_router = APIRouter(dependencies=[create_dependency("prefix_router")])
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Jun 11 20:35:39 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/CertificatePinnerKotlinTest.kt

    import org.junit.jupiter.api.Test
    
    class CertificatePinnerKotlinTest {
      @Test
      fun successfulCheckSha1Pin() {
        val certificatePinner =
          CertificatePinner.Builder()
            .add("example.com", "sha1/" + certA1.certificate.sha1Hash().base64())
            .build()
    
        certificatePinner.check("example.com", listOf(certA1.certificate))
      }
    
      @Test fun successfulFindMatchingPins() {
        val certificatePinner =
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  4. build-logic/cleanup/src/main/kotlin/gradlebuild/cleanup/services/DaemonTracker.kt

        override fun close() {
            logger.lifecycle("Cleaning up daemons...")
            cleanUpDaemons()
        }
    
        fun newDaemonListener() =
            object : TestListener {
                override fun beforeTest(test: TestDescriptor) = Unit
                override fun afterTest(test: TestDescriptor, result: TestResult) = Unit
                override fun beforeSuite(suite: TestDescriptor) {
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Mon Jan 08 12:45:57 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/-CacheControlCommon.kt

        headerValue = null,
      )
    }
    
    internal fun CacheControl.Builder.commonNoCache() =
      apply {
        this.noCache = true
      }
    
    internal fun CacheControl.Builder.commonNoStore() =
      apply {
        this.noStore = true
      }
    
    internal fun CacheControl.Builder.commonOnlyIfCached() =
      apply {
        this.onlyIfCached = true
      }
    
    internal fun CacheControl.Builder.commonNoTransform() =
      apply {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 15 13:41:01 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  6. buildSrc/src/main/kotlin/AlpnVersions.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    
    // https://www.eclipse.org/jetty/documentation/current/alpn-chapter.html#alpn-versions
    private fun alpnBootVersionForPatchVersion(patchVersion: Int): String? {
      return when (patchVersion) {
        in 0..24 -> "8.1.0.v20141016"
        in 25..30 -> "8.1.2.v20141202"
        in 31..50 -> "8.1.3.v20150130"
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Jan 07 16:05:34 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  7. okcurl/src/main/kotlin/okhttp3/curl/Main.kt

      var client: Call.Factory? = null
    
      override fun run() {
        LoggingUtil.configureLogging(debug = verbose, showHttp2Frames = showHttp2Frames, sslDebug = sslDebug)
    
        commonRun()
      }
    
      fun createRequest(): Request = commonCreateRequest()
    
      fun createClient(): Call.Factory {
        val builder = OkHttpClient.Builder()
        builder.followSslRedirects(followRedirects)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  8. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerReader.kt

       * longer usable by the current type's members.
       */
      fun <T> withTypeHint(block: () -> T): T {
        typeHintStack.add(null)
        try {
          return block()
        } finally {
          typeHintStack.removeAt(typeHintStack.size - 1)
        }
      }
    
      fun readBoolean(): Boolean {
        if (bytesLeft != 1L) throw ProtocolException("unexpected length: $bytesLeft at $this")
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  9. okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DnsRecordCodecTest.kt

    class DnsRecordCodecTest {
      @Test
      fun testGoogleDotComEncoding() {
        val encoded = encodeQuery("google.com", TYPE_A)
        assertThat(encoded).isEqualTo("AAABAAABAAAAAAAABmdvb2dsZQNjb20AAAEAAQ")
      }
    
      private fun encodeQuery(
        host: String,
        type: Int,
      ): String {
        return DnsRecordCodec.encodeQuery(host, type).base64Url().replace("=", "")
      }
    
      @Test
      fun testGoogleDotComEncodingWithIPv6() {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  10. build-logic/binary-compatibility/src/main/kotlin/gradlebuild/binarycompatibility/sources/SourcesRepository.kt

        fun <T : Any?> executeQuery(apiSourceFile: ApiSourceFile.Java, query: JavaSourceQuery<T>): T =
            openJavaCompilationUnitsByFile
                .computeIfAbsent(apiSourceFile.currentFile) { JavaParser().parse(it).getResult().get() }
                .accept(query.visitor, null)
                ?: query.defaultValue
    
    
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Fri Jun 28 08:29:24 UTC 2024
    - 4K bytes
    - Viewed (0)
Back to top