Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 105 for Main (0.13 sec)

  1. samples/guide/src/main/java/okhttp3/recipes/PostStreaming.java

          if (!response.isSuccessful()) throw new IOException("Unexpected code " + response);
    
          System.out.println(response.body().string());
        }
      }
    
      public static void main(String... args) throws Exception {
        new PostStreaming().run();
      }
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Jul 06 03:18:15 GMT 2018
    - 2.1K bytes
    - Viewed (0)
  2. samples/static-server/src/main/java/okhttp3/sample/SampleServer.java

        if (path.endsWith(".html")) return "text/html; charset=utf-8";
        if (path.endsWith(".txt")) return "text/plain; charset=utf-8";
        return "application/octet-stream";
      }
    
      public static void main(String[] args) throws Exception {
        if (args.length != 4) {
          System.out.println("Usage: SampleServer <keystore> <password> <root file> <port>");
          return;
        }
    
        String keystoreFile = args[0];
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Jan 02 02:50:44 GMT 2019
    - 4.7K bytes
    - Viewed (0)
  3. okcurl/src/main/kotlin/okhttp3/curl/internal/-MainCommon.kt

    import okhttp3.MediaType
    import okhttp3.MediaType.Companion.toMediaTypeOrNull
    import okhttp3.Request
    import okhttp3.RequestBody.Companion.toRequestBody
    import okhttp3.curl.Main
    import okhttp3.internal.http.StatusLine
    import okio.sink
    
    internal fun Main.commonCreateRequest(): Request {
      val request = Request.Builder()
    
      val requestMethod = method ?: if (data != null) "POST" else "GET"
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.7K bytes
    - Viewed (0)
  4. okcurl/build.gradle.kts

    }
    
    val copyResourcesTemplates = tasks.register<Copy>("copyResourcesTemplates") {
      from("src/main/resources-templates")
      into("$buildDir/generated/resources-templates")
      expand("projectVersion" to "${project.version}")
      filteringCharset = Charsets.UTF_8.toString()
    }
    
    kotlin {
      sourceSets {
        val main by getting {
          resources.srcDir(copyResourcesTemplates.get().outputs)
        }
      }
    }
    
    dependencies {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 1.8K bytes
    - Viewed (1)
  5. okcurl/src/test/kotlin/okhttp3/curl/OkcurlTest.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package okhttp3.curl
    
    import kotlin.test.Test
    
    class OkcurlTest {
      @Test
      fun simple() {
        Main().main(listOf("--help"))
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 732 bytes
    - Viewed (0)
  6. docs/changelogs/changelog_4x.md

     [CVE-2022-24329]: https://nvd.nist.gov/vuln/detail/CVE-2022-24329
     [dev_server]: https://github.com/square/okhttp/blob/482f88300f78c3419b04379fc26c3683c10d6a9d/samples/guide/src/main/java/okhttp3/recipes/kt/DevServer.kt
     [fun_interface]: https://kotlinlang.org/docs/reference/fun-interfaces.html
     [iana_websocket]: https://www.iana.org/assignments/websocket/websocket.txt
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 17 13:25:31 GMT 2024
    - 25.2K bytes
    - Viewed (0)
  7. docs/features/r8_proguard.md

    also need rules from [Okio][okio] which is a dependency of this library.
    
     [okhttp3_pro]: https://raw.githubusercontent.com/square/okhttp/master/okhttp/src/main/resources/META-INF/proguard/okhttp3.pro
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 607 bytes
    - Viewed (0)
  8. samples/guide/src/test/kotlin/okhttp3/AllMainsTest.kt

    private fun mainFiles(): List<File> {
      val directories =
        listOf(
          "$prefix/samples/guide/src/main/java/okhttp3/guide",
          "$prefix/samples/guide/src/main/java/okhttp3/recipes",
          "$prefix/samples/guide/src/main/java/okhttp3/recipes/kt",
        ).map { File(it) }
    
      return directories.flatMap {
        it.listFiles().orEmpty().filter { f -> f.isFile }.toList()
      }
    }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.7K bytes
    - Viewed (0)
  9. okhttp-brotli/src/test/java/okhttp3/brotli/BrotliTestMain.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package okhttp3.brotli
    
    import okhttp3.OkHttpClient
    import okhttp3.Request
    
    fun main() {
      val client =
        OkHttpClient.Builder()
          .addInterceptor(BrotliInterceptor)
          .build()
    
      sendRequest("https://httpbin.org/brotli", client)
      sendRequest("https://httpbin.org/gzip", client)
    }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.1K bytes
    - Viewed (3)
  10. samples/guide/src/main/java/okhttp3/recipes/kt/SynchronousGet.kt

          for ((name, value) in response.headers) {
            println("$name: $value")
          }
    
          println(response.body.string())
        }
      }
    }
    
    fun main() {
      SynchronousGet().run()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.2K bytes
    - Viewed (0)
Back to top