Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -767,14 +767,14 @@ release is the version name.

## Version 4.x

See [4.x Change log](https://square.github.io/okhttp/changelogs/changelog_4x/) for the legacy version changelogs.
See [4.x Change log](https://lysine.dev/okhttp/changelogs/changelog_4x/) for the legacy version changelogs.

[GraalVM]: https://www.graalvm.org/
[Gradle module metadata]: https://docs.gradle.org/current/userguide/publishing_gradle_module_metadata.html
[HTTP 101]: https://httpwg.org/specs/rfc9110.html#status.101
[JPMS]: https://openjdk.org/projects/jigsaw/spec/
[Ktor]: https://ktor.io/
[Retrofit]: https://square.github.io/retrofit/
[Retrofit]: https://lysine.dev/retrofit/
[ZSTD-KMP]: https://github.com/square/zstd-kmp
[androidx_startup]: https://developer.android.com/jetpack/androidx/releases/startup
[annotation_1_9_1]: https://developer.android.com/jetpack/androidx/releases/annotation#annotation-1.9.1
Expand All @@ -800,21 +800,21 @@ See [4.x Change log](https://square.github.io/okhttp/changelogs/changelog_4x/) f
[kotlin_2_2_20]: https://github.com/JetBrains/kotlin/releases/tag/v2.2.20
[kotlin_2_2_21]: https://github.com/JetBrains/kotlin/releases/tag/v2.2.21
[loom]: https://docs.oracle.com/en/java/javase/21/core/virtual-threads.html
[okio_2_9_0]: https://square.github.io/okio/changelog/#version-290
[okio_3_0_0]: https://square.github.io/okio/changelog/#version-300
[okio_3_12_0]: https://square.github.io/okio/changelog/#version-3120
[okio_3_13_0]: https://square.github.io/okio/changelog/#version-3130
[okio_3_15_0]: https://square.github.io/okio/changelog/#version-3150
[okio_3_16_0]: https://square.github.io/okio/changelog/#version-3160
[okio_3_16_1]: https://square.github.io/okio/changelog/#version-3161
[okio_3_16_2]: https://square.github.io/okio/changelog/#version-3162
[okio_3_16_3]: https://square.github.io/okio/changelog/#version-3163
[okio_3_16_4]: https://square.github.io/okio/changelog/#version-3164
[okio_3_17_0]: https://square.github.io/okio/changelog/#version-3170
[okio_3_1_0]: https://square.github.io/okio/changelog/#version-310
[okio_3_2_0]: https://square.github.io/okio/changelog/#version-320
[okio_3_7_0]: https://square.github.io/okio/changelog/#version-370
[okio_3_9_0]: https://square.github.io/okio/changelog/#version-390
[okio_2_9_0]: https://lysine.dev/okio/changelog/#version-290
[okio_3_0_0]: https://lysine.dev/okio/changelog/#version-300
[okio_3_12_0]: https://lysine.dev/okio/changelog/#version-3120
[okio_3_13_0]: https://lysine.dev/okio/changelog/#version-3130
[okio_3_15_0]: https://lysine.dev/okio/changelog/#version-3150
[okio_3_16_0]: https://lysine.dev/okio/changelog/#version-3160
[okio_3_16_1]: https://lysine.dev/okio/changelog/#version-3161
[okio_3_16_2]: https://lysine.dev/okio/changelog/#version-3162
[okio_3_16_3]: https://lysine.dev/okio/changelog/#version-3163
[okio_3_16_4]: https://lysine.dev/okio/changelog/#version-3164
[okio_3_17_0]: https://lysine.dev/okio/changelog/#version-3170
[okio_3_1_0]: https://lysine.dev/okio/changelog/#version-310
[okio_3_2_0]: https://lysine.dev/okio/changelog/#version-320
[okio_3_7_0]: https://lysine.dev/okio/changelog/#version-370
[okio_3_9_0]: https://lysine.dev/okio/changelog/#version-390
[rfc_8305]: https://tools.ietf.org/html/rfc8305
[startup_1_2_0]: https://developer.android.com/jetpack/androidx/releases/startup#1.2.0
[uts46]: https://www.unicode.org/reports/tr46
Expand Down
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ Committer's Guides
* [Releasing][releasing]

[cla]: https://spreadsheets.google.com/spreadsheet/viewform?formkey=dDViT2xzUHAwRkI3X3k5Z0lQM091OGc6MQ&ndplr=1
[concurrency]: https://square.github.io/okhttp/concurrency/
[debug_logging]: https://square.github.io/okhttp/debug_logging/
[releasing]: https://square.github.io/okhttp/releasing/
[security]: https://square.github.io/okhttp/security/
[works_with_okhttp]: https://square.github.io/okhttp/works_with_okhttp/
[okhttp_build]: https://github.com/square/okhttp/blob/master/okhttp/build.gradle
[concurrency]: https://lysine.dev/okhttp/concurrency/
[debug_logging]: https://lysine.dev/okhttp/debug_logging/
[releasing]: https://lysine.dev/okhttp/releasing/
[security]: https://lysine.dev/okhttp/security/
[works_with_okhttp]: https://lysine.dev/okhttp/works_with_okhttp/
[okhttp_build]: https://github.com/lysine-dev/okhttp/blob/master/okhttp/build.gradle.kts
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,16 +266,16 @@ limitations under the License.
[GraalVM]: https://www.graalvm.org/
[androidx_startup]: https://developer.android.com/jetpack/androidx/releases/startup
[bom]: https://docs.gradle.org/6.2/userguide/platforms.html#sub:bom_import
[changelog]: https://square.github.io/okhttp/changelog/
[changelog]: https://lysine.dev/okhttp/changelog/
[conscrypt]: https://github.com/google/conscrypt/
[get_example]: https://raw.github.com/square/okhttp/master/samples/guide/src/main/java/okhttp3/guide/GetExample.java
[get_example]: https://raw.github.com/lysine-dev/okhttp/master/samples/guide/src/main/java/okhttp3/guide/GetExample.java
[kotlin]: https://kotlinlang.org/
[okhttp3_pro]: https://raw.githubusercontent.com/square/okhttp/master/okhttp/src/main/resources/META-INF/proguard/okhttp3.pro
[okhttp]: https://square.github.io/okhttp/
[okhttp_312x]: https://github.com/square/okhttp/tree/okhttp_3.12.x
[okio]: https://github.com/square/okio
[post_example]: https://raw.github.com/square/okhttp/master/samples/guide/src/main/java/okhttp3/guide/PostExample.java
[r8_proguard]: https://square.github.io/okhttp/features/r8_proguard/
[recipes]: https://square.github.io/okhttp/recipes/
[okhttp3_pro]: https://raw.githubusercontent.com/lysine-dev/okhttp/master/okhttp/okhttp3.pro
[okhttp]: https://lysine.dev/okhttp/
[okhttp_312x]: https://github.com/lysine-dev/okhttp/tree/okhttp_3.12.x
[okio]: https://github.com/lysine-dev/okio
[post_example]: https://raw.github.com/lysine-dev/okhttp/master/samples/guide/src/main/java/okhttp3/guide/PostExample.java
[r8_proguard]: https://lysine.dev/okhttp/features/r8_proguard/
[recipes]: https://lysine.dev/okhttp/recipes/
[snap]: https://s01.oss.sonatype.org/content/repositories/snapshots/
[tls_history]: https://square.github.io/okhttp/tls_configuration_history/
[tls_history]: https://lysine.dev/okhttp/tls_configuration_history/
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ open class MainActivity : ComponentActivity() {
// Ensure we are compiling against the right variant
println(AndroidPlatform.isSupported)

val url = "https://github.com/square/okhttp".toHttpUrl()
val url = "https://github.com/lysine-dev/okhttp".toHttpUrl()
println(url.topPrivateDomain())

client.newCall(Request(url)).enqueue(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ class OkHttpTest {
client.newCall(request).execute().close()
// Hopefully this passes
} catch (ioe: IOException) {
// https://github.com/square/okhttp/issues/5840
// https://github.com/lysine-dev/okhttp/issues/5840
when (ioe.cause) {
is IllegalArgumentException -> {
assertEquals("Android internal error", ioe.message)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class StrictModeTest {
applyStrictMode()

// Not currently safe
// See https://github.com/square/okhttp/pull/8248
// See https://github.com/lysine-dev/okhttp/pull/8248
OkHttpClient()

assertThat(violations).hasSize(1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ configure<MavenPublishBaseExtension> {
pom {
name.set(project.name)
description.set("Square’s meticulous HTTP client for Java and Kotlin.")
url.set("https://square.github.io/okhttp/")
url.set("https://lysine.dev/okhttp/")
licenses {
license {
name.set("The Apache Software License, Version 2.0")
Expand All @@ -45,9 +45,9 @@ configure<MavenPublishBaseExtension> {
}
}
scm {
connection.set("scm:git:https://github.com/square/okhttp.git")
developerConnection.set("scm:git:ssh://git@github.com/square/okhttp.git")
url.set("https://github.com/square/okhttp")
connection.set("scm:git:https://github.com/lysine-dev/okhttp.git")
developerConnection.set("scm:git:ssh://git@github.com/lysine-dev/okhttp.git")
url.set("https://github.com/lysine-dev/okhttp")
}
developers {
developer {
Expand Down
18 changes: 9 additions & 9 deletions docs/changelogs/changelog_4x.md
Original file line number Diff line number Diff line change
Expand Up @@ -572,14 +572,14 @@ _2019-06-03_

## Version 3.x

[Change log](https://square.github.io/okhttp/changelog_3x/)
[Change log](https://lysine.dev/okhttp/changelog_3x/)


[bom]: https://docs.gradle.org/6.2/userguide/platforms.html#sub:bom_import
[bouncy_castle_releases]: https://www.bouncycastle.org/releasenotes.html
[CVE-2021-0341]: https://nvd.nist.gov/vuln/detail/CVE-2021-0341
[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
[dev_server]: https://github.com/lysine-dev/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
[jetty_8_252]: https://webtide.com/jetty-alpn-java-8u252/
Expand All @@ -589,15 +589,15 @@ _2019-06-03_
[kotlin_1_8_21]: https://github.com/JetBrains/kotlin/releases/tag/v1.8.21
[legacy_interceptor]: https://gist.github.com/swankjesse/80135f4e03629527e723ab3bcf64be0b
[okhttp4_blog_post]: https://cashapp.github.io/2019-06-26/okhttp-4-goes-kotlin
[okio.FileSystem]: https://square.github.io/okio/file_system/
[okio_2_6_0]: https://square.github.io/okio/changelog/#version-260
[okio_2_7_0]: https://square.github.io/okio/changelog/#version-270
[okio_3_0_0]: https://square.github.io/okio/changelog/#version-300
[okio_3_2_0]: https://square.github.io/okio/changelog/#version-320
[okio_3_6_0]: https://square.github.io/okio/changelog/#version-360
[okio.FileSystem]: https://lysine.dev/okio/file_system/
[okio_2_6_0]: https://lysine.dev/okio/changelog/#version-260
[okio_2_7_0]: https://lysine.dev/okio/changelog/#version-270
[okio_3_0_0]: https://lysine.dev/okio/changelog/#version-300
[okio_3_2_0]: https://lysine.dev/okio/changelog/#version-320
[okio_3_6_0]: https://lysine.dev/okio/changelog/#version-360
[public_suffix]: https://publicsuffix.org/
[rfc_2045]: https://tools.ietf.org/html/rfc2045
[rfc_7231_647]: https://tools.ietf.org/html/rfc7231#section-6.4.7
[rfc_7692]: https://tools.ietf.org/html/rfc7692
[semver]: https://semver.org/
[upgrading_to_okhttp_4]: https://square.github.io/okhttp/upgrading_to_okhttp_4/
[upgrading_to_okhttp_4]: https://lysine.dev/okhttp/upgrading_to_okhttp_4/
12 changes: 6 additions & 6 deletions docs/contribute/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ Committer's Guides
* [Releasing][releasing]

[cla]: https://spreadsheets.google.com/spreadsheet/viewform?formkey=dDViT2xzUHAwRkI3X3k5Z0lQM091OGc6MQ&ndplr=1
[concurrency]: https://square.github.io/okhttp/concurrency/
[debug_logging]: https://square.github.io/okhttp/debug_logging/
[releasing]: https://square.github.io/okhttp/releasing/
[security]: https://square.github.io/okhttp/security/
[works_with_okhttp]: https://square.github.io/okhttp/works_with_okhttp/
[okhttp_build]: https://github.com/square/okhttp/blob/master/okhttp/build.gradle
[concurrency]: https://lysine.dev/okhttp/concurrency/
[debug_logging]: https://lysine.dev/okhttp/debug_logging/
[releasing]: https://lysine.dev/okhttp/releasing/
[security]: https://lysine.dev/okhttp/security/
[works_with_okhttp]: https://lysine.dev/okhttp/works_with_okhttp/
[okhttp_build]: https://github.com/lysine-dev/okhttp/blob/master/okhttp/build.gradle.kts
4 changes: 2 additions & 2 deletions docs/contribute/debug_logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ This logs inbound (`<<`) and outbound (`>>`) frames for HTTP/2 connections.
[2020-01-01 00:00:05] << 0x00000000 8 GOAWAY
```

### Task Runner Logging
### Task Runner Logging

This logs task enqueues, starts, and finishes.

Expand All @@ -59,4 +59,4 @@ This logs task enqueues, starts, and finishes.
[2020-01-01 00:00:00] Q10000 finished run in 739 µs: OkHttp ConnectionPool
```

[OkHttpDebugLogging.kt]: https://github.com/square/okhttp/blob/master/okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpDebugLogging.kt
[OkHttpDebugLogging.kt]: https://github.com/lysine-dev/okhttp/blob/master/okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpDebugLogging.kt
2 changes: 1 addition & 1 deletion docs/features/caching.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,4 @@ Make sure you are reading responses fully as unless they are read fully, cancell

### Overriding normal cache behaviour

See [`Cache`](https://square.github.io/okhttp/5.x/okhttp/okhttp3/-cache/) documentation.
See [`Cache`](https://lysine.dev/okhttp/5.x/okhttp/okhttp3/-cache/) documentation.
12 changes: 6 additions & 6 deletions docs/features/calls.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

The HTTP client’s job is to accept your request and produce its response. This is simple in theory but it gets tricky in practice.

## [Requests](https://square.github.io/okhttp/5.x/okhttp/okhttp3/-request/)
## [Requests](https://lysine.dev/okhttp/5.x/okhttp/okhttp3/-request/)

Each HTTP request contains a URL, a method (like `GET` or `POST`), and a list of headers. Requests may also contain a body: a data stream of a specific content type.

## [Responses](https://square.github.io/okhttp/5.x/okhttp/okhttp3/-response/)
## [Responses](https://lysine.dev/okhttp/5.x/okhttp/okhttp3/-response/)

The response answers the request with a code (like 200 for success or 404 for not found), headers, and its own optional body.

Expand All @@ -28,25 +28,25 @@ If a conditional GET was successful, responses from the network and cache are me

When your requested URL has moved, the webserver will return a response code like `302` to indicate the document’s new URL. OkHttp will follow the redirect to retrieve a final response.

If the response issues an authorization challenge, OkHttp will ask the [`Authenticator`](https://square.github.io/okhttp/5.x/okhttp/okhttp3/-authenticator/) (if one is configured) to satisfy the challenge. If the authenticator supplies a credential, the request is retried with that credential included.
If the response issues an authorization challenge, OkHttp will ask the [`Authenticator`](https://lysine.dev/okhttp/5.x/okhttp/okhttp3/-authenticator/) (if one is configured) to satisfy the challenge. If the authenticator supplies a credential, the request is retried with that credential included.

## Retrying Requests

Sometimes connections fail: either a pooled connection was stale and disconnected, or the webserver itself couldn’t be reached. OkHttp will retry the request with a different route if one is available.

## [Calls](https://square.github.io/okhttp/5.x/okhttp/okhttp3/-call/)
## [Calls](https://lysine.dev/okhttp/5.x/okhttp/okhttp3/-call/)

With rewrites, redirects, follow-ups and retries, your simple request may yield many requests and responses. OkHttp uses `Call` to model the task of satisfying your request through however many intermediate requests and responses are necessary. Typically this isn’t many! But it’s comforting to know that your code will continue to work if your URLs are redirected or if you failover to an alternate IP address.

Calls are executed in one of two ways:

* **Synchronous:** your thread blocks until the response is readable.
* **Asynchronous:** you enqueue the request on any thread, and get [called back](https://square.github.io/okhttp/5.x/okhttp/okhttp3/-callback/) on another thread when the response is readable.
* **Asynchronous:** you enqueue the request on any thread, and get [called back](https://lysine.dev/okhttp/5.x/okhttp/okhttp3/-callback/) on another thread when the response is readable.

Calls can be canceled from any thread. This will fail the call if it hasn’t yet completed! Code that is writing the request body or reading the response body will suffer an `IOException` when its call is canceled.

## Dispatch

For synchronous calls, you bring your own thread and are responsible for managing how many simultaneous requests you make. Too many simultaneous connections wastes resources; too few harms latency.

For asynchronous calls, [`Dispatcher`](https://square.github.io/okhttp/5.x/okhttp/okhttp3/-dispatcher/) implements policy for maximum simultaneous requests. You can set maximums per-webserver (default is 5), and overall (default is 64).
For asynchronous calls, [`Dispatcher`](https://lysine.dev/okhttp/5.x/okhttp/okhttp3/-dispatcher/) implements policy for maximum simultaneous requests. You can set maximums per-webserver (default is 5), and overall (default is 64).
Loading
Loading