1
0
mirror of https://github.com/square/okhttp.git synced 2025-11-24 18:41:06 +03:00
Commit Graph

231 Commits

Author SHA1 Message Date
Jesse Wilson
7292e54a63 Update the changelog for OkHttp 4.0.1 2019-07-10 11:40:44 -04:00
Jesse Wilson
911c5bf5b2 Prepare for release 4.0.0. 2019-06-26 19:30:33 -07:00
Jesse Wilson
50e4c422d2 Move the API docs from /okhttp/api to /okhttp/4.x 2019-06-21 23:23:46 -04:00
Jesse Wilson
70cd67c75d Tweak the MkDocs build
Retain the 3.x docs by doing a dirty MkDocs build
Build more Dokka projects
2019-06-20 00:01:47 -04:00
Jesse Wilson
0bca781fc3 New releasing guide.
Also make readmes offer artifacts with Gradle syntax
2019-05-25 21:26:22 -04:00
Jesse Wilson
f87bb6d817 Reorder the members of OkHttpClient (#5114)
This isn't perfect but I think it's a bit more logical.
2019-05-25 06:50:37 +01:00
Masaru Nomura
7ad4f970ba Idiomatic Kotlin for Response.kt
- define `@get:JvmName(...)` for the following vals in constructor instead of passing `builder: Builder`.
  - `request: Request`
  - `protocol: Protocol`
  - `message: String`
  - `code: Int`
  - `handshake: Handshake?`
  - `headers: Headers`
  - `body: ResponseBody?`
  - `networkResponse: Response?`
  - `cacheResponse: Response?`
  - `priorResponse: Response?`
  - `sentRequestAtMillis: Long`
  - `receivedResponseAtMillis: Long`
  - `exchange: Exchange?`

- add `@Deprecated(...)` to the following functions.
  - `fun request(): Request`
  - `fun protocol(): Protocol`
  - `fun message(): String`
  - `fun code(): Int`
  - `fun handshake(): Handshake?`
  - `fun headers(): Headers`
  - `fun body(): ResponseBody?`
  - `fun networkResponse(): Response?`
  - `fun cacheResponse(): Response?`
  - `fun priorResponse(): Response?`
  - `fun sentRequestAtMillis(): Long`
  - `fun receivedResponseAtMillis(): Long`
  - `fun cacheControl(): CacheControl`

- clean up code where `()`(parentheses) is unnecessarily used.
2019-05-24 16:16:29 -04:00
Jake Wharton
860e4c5975 Convert Route to expose properties 2019-05-24 10:03:48 -04:00
Jesse Wilson
030dbeae26 Delete unwanted whitespace.
I think the convert-to-Kotlin feature adds these
2019-05-22 21:12:55 -04:00
monkey-mas
fa9118949e Use idiomatic Kotlin in Request.kt (#5092)
- define @get:JvmName(...) for the following vals in constructor instead of passing builder: Builder.
  - url: HttpUrl
  - method: String
  - headers: Headers
  - body: RequestBody?

- add @Deprecated(...) to the following functions.
  - fun url(): HttpUrl
  - fun method(): String
  - fun headers(): Headers
  - fun body(): RequestBody?
  - fun cacheControl(): CacheControl

- clean up code where ()(Parentheses) is unnecessarily used.
2019-05-22 15:55:00 -04:00
Jake Wharton
f2187bb6e3 Smattering of Kotlin part 2 (#5087)
* Migrate eventListenerFactory to extension function

* Inline platformTrustManager

* Migrate delimiterOffset to extension functions

Also overhaul these and other string-manipulating functions to have default arguments for start/end indices.

* Migrate hostHeader and toHeaders to extension functions
2019-05-21 21:51:18 -04:00
Jake Wharton
42a41f3857 Smattering of Kotlin stuff (#5083)
* Migrate sameConnection to extension function

* Migrate bomAwareCharset to extension function

* Migrate verifyAsIpAddress to extension function

* Migrate indexOfControlOrNonAscii to extension function

* Migrate skip(Leading/Trailing)AsciiWhitespace and trimSubstring to extension functions

* Migrate toHeaderBlock to extension function
2019-05-20 23:17:37 -04:00
Jesse Wilson
e67ec3c51e Adopt HttpUrl's new Kotlin API 2019-05-20 21:01:04 -04:00
Jake Wharton
450750c031 Eliminate Util object in favor of top-level functions 2019-05-20 18:13:30 -04:00
Jesse Wilson
27200057b8 Adopt idiomatic Kotlin in Challenge 2019-05-13 20:56:53 -04:00
Yuri Schimke
f3949c23bc Spotless code formatter 2019-04-10 22:44:58 +01:00
Jesse Wilson
ab85960cdb Convert JavaNetAuthenticator to Kotlin (#4909)
* Rename JavaNetAuthenticator.java to .kt

* Convert JavaNetAuthenticator to Kotlin
2019-04-09 22:56:52 -07:00
Jesse Wilson
11805c14a4 Put apply plugin at the top of the build 2019-04-07 16:55:52 -04:00
Jesse Wilson
0ece6afccc Convert Cookie to Kotlin 2019-03-24 22:15:03 -05:00
Jesse Wilson
b6573d5558 Hook up japicmp for all stable artifacts
This excludes okhttp-sse and okhttp-dnsoverhttps
2019-03-18 01:03:52 -06:00
Jesse Wilson
c53f8db73d Configure gradle artifact uploads 2019-03-17 09:13:01 -04:00
Jesse Wilson
dc1e870d24 Basic Gradle support 2019-03-17 00:16:26 -04:00
Jesse Wilson
695b46cb2e [maven-release-plugin] prepare for next development iteration 2019-03-13 23:42:40 -04:00
Jesse Wilson
44d51d0ceb [maven-release-plugin] prepare release parent-3.14.0 2019-03-13 23:42:33 -04:00
Benoît Quenaudon
6c4855a7c7 Use AssertJ in tests (#4713) 2019-03-13 21:07:33 -04:00
Jesse Wilson
4aca390e59 Delete long-deprecated OkUrlFactory.
Some OkHttp behavior was only tested via this API, so this PR includes a bunch
of test migration. The test migration is as mechanical as possible, so we aren't
really using idiomatic APIs yet in these tests.

The `okhttp-urlconnection` survives for the JavaNetCookieJar and the
JavaNetAuthenticator. We can't remove these any time soon unfortunately.
2019-03-02 12:23:17 -05:00
Jesse Wilson
0a59e68b16 [maven-release-plugin] prepare for next development iteration 2019-02-05 12:15:46 -05:00
Jesse Wilson
d28d2cec21 [maven-release-plugin] prepare release parent-3.13.1 2019-02-05 12:15:39 -05:00
Jesse Wilson
5ecd590c8c [maven-release-plugin] prepare for next development iteration 2019-02-04 23:32:52 -05:00
Jesse Wilson
d55661544b [maven-release-plugin] prepare release parent-3.13.0 2019-02-04 23:32:45 -05:00
Jesse Wilson
9d28d9c9e2 Get trailers working for HTTP/1
The most awkward part of this is the changes to the way MockResponse
handled chunked encoding. It used to consider trailers a part of its
chunked response; now it does not.
2019-01-14 22:33:54 -05:00
Jesse Wilson
778e0334a4 Use lambdas where appropriate 2019-01-11 22:31:36 -05:00
Jesse Wilson
0dc50f1112 Run IntelliJ inspections on the codebase
Some nullability warnings, some diamond operators, adopting Objects.equals(),
and some dead code elimination.
2019-01-01 12:41:06 -05:00
Jesse Wilson
52e251836a Adopt some Java 8 features: diamonds, StandardCharsets 2019-01-01 00:48:07 -05:00
Jesse Wilson
fee3e530ad Get rid of some Java 7 stuff.
Still more to do, but this is a start.
2018-12-31 21:58:41 -05:00
Jesse Wilson
bf8e653c3a Get the latest versions of things.
I used 'mvn versions:use-latest-versions' and also just a bunch of manual
fixing.
2018-12-28 15:53:46 -05:00
Dmitry Zolotukhin
32bf2f0fc1 Handle security exception when testing if conscrypt should be used (#4448)
* Handle security exception when checking if conscrypt is preferred.

* Handle security exception when getting the java.specification.version.

* Handle security exception when getting the http.agent property.

* Moved the System.getProperty try-catch block into Utils.
2018-12-23 10:57:18 -05:00
Yuri Schimke
f391dc5fd3 Add back to classes 2018-12-09 16:44:08 +00:00
Yuri Schimke
4b204037e6 Remove overlapping package-info.java 2018-12-09 16:39:34 +00:00
Jesse Wilson
c273b3be38 [maven-release-plugin] prepare for next development iteration 2018-11-16 23:44:19 -05:00
Jesse Wilson
7f63a35ab1 [maven-release-plugin] prepare release parent-3.12.0 2018-11-16 23:44:12 -05:00
Yuri Schimke
ceb42f1322 EverythingIsNonNull annotation (#4286)
Adds an annotation EverythingIsNonNull, and fixes some nullability on public API.
2018-09-30 09:33:42 +01:00
Jesse Wilson
7ef5f55d38 [maven-release-plugin] prepare for next development iteration 2018-07-12 23:41:09 -04:00
Jesse Wilson
95ae0cf421 [maven-release-plugin] prepare release parent-3.11.0 2018-07-12 23:41:00 -04:00
Jesse Wilson
37887141fe Rename TlsNode to HandshakeCertificates (#4141) 2018-07-12 06:39:20 +01:00
Jesse Wilson
db2ae92156 Fixup HeldCertificate so that it's worthy of production use.
This changes the default from the insecure 1024-bit RSA to a secure 256-bit ECDSA
key. It adds a new option to use RSA keys for interoperating with older clients.
2018-07-10 22:49:00 -04:00
Jesse Wilson
b1bfe7130c New okhttp-tls module 2018-07-09 12:00:28 -04:00
Jesse Wilson
31c511f694 Rename SslClient to TlsNode and make it a public API
https://github.com/square/okhttp/issues/3934
2018-07-08 15:33:16 -04:00
Jake Wharton
a2fb46b1a4 Merge pull request #4118 from square/jakew/parseOrThrow/2018-07-05
Add get(String) alternative which fails on invalid inputs
2018-07-06 15:49:25 -04:00
Jake Wharton
351b3d6bf7 Add get(String) alternative which fails on invalid inputs
This is an unchecked-throwing version of parse(String).
2018-07-06 15:30:55 -04:00