1
0
mirror of https://github.com/square/okhttp.git synced 2025-10-29 05:49:20 +03:00
Commit Graph

97 Commits

Author SHA1 Message Date
Masaru Nomura
f0a580070e Idiomatic Kotlin in DnsOverHttps.kt
- define the following vals in constructor instead of passing `builder: Builder`.
  - `@get:JvmName(...)` val
    - `client: OkHttpClient`
    - `url: HttpUrl`
    - `includeIPv6: Boolean`
    - `post: Boolean`
    - `resolvePrivateAddresses: Boolean`
    - `resolvePublicAddresses: Boolean`
  - `private` val
    - `systemDns: Dns`
    - `bootstrapDnsHosts: List<InetAddress>?`

- add `@Deprecated(...)` to the following functions.
  - `fun client(): OkHttpClient`
  - `fun url(): HttpUrl`
  - `fun includeIPv6(): Boolean`
  - `fun post(): Boolean`
  - `fun resolvePrivateAddresses(): Boolean`
  - `fun resolvePublicAddresses(): Boolean`
2019-05-26 16:28:07 -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
8bb58332db Extension Functions toRequestBody(), toResponseBody() 2019-05-25 14:02:55 -04:00
Jesse Wilson
9c20f17270 Use vals in OkHttpClient 2019-05-25 10:34:25 -04:00
Jesse Wilson
8e96075fcd Merge pull request #5116 from TangHuaiZhe/dev
Replace !isEmpty with isNotEmpty
2019-05-25 09:49:25 -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
Tang HuaiZhe
376b9a4e59 Replace !isEmpty with isNotEmpty 2019-05-25 12:00:05 +08: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
Jesse Wilson
030dbeae26 Delete unwanted whitespace.
I think the convert-to-Kotlin feature adds these
2019-05-22 21:12:55 -04:00
Jesse Wilson
e67ec3c51e Adopt HttpUrl's new Kotlin API 2019-05-20 21:01:04 -04:00
Jesse Wilson
0b89e0ee59 Use apply {} in builders 2019-05-20 19:55:47 -04:00
Jesse Wilson
2c59337e31 Use check/require instead of if/throw 2019-05-20 19:02:41 -04:00
Jesse Wilson
2e0dfa29d0 Don't use @JvmStatic for internal calls 2019-05-20 16:00:40 -04:00
Yuri Schimke
dcf5c8ceb6 Fix/Simplify regex usage (#5059)
* Fix/Simplify regex usage

* Cleanup
2019-05-18 06:33:34 -04:00
Yuri Schimke
f3949c23bc Spotless code formatter 2019-04-10 22:44:58 +01:00
Tang HuaiZhe
58afc0bc56 Delete unused imports 2019-04-06 11:54:42 +08:00
Jesse Wilson
e458bd0a90 Configure Dokka 2019-03-30 17:28:37 -04:00
Yuri Schimke
e2cfcb35ea Okio upgrade post kotlin (#4814)
Okio 2.2.2 upgrade and adopt kotlin friendly API
2019-03-29 21:54:10 +00:00
Jesse Wilson
77fcbf3d99 Convert CertificatePinner to Kotlin (#4801) 2019-03-27 13:28:18 -05:00
Yuri Schimke
c2fa8ca193 Refactor DOH classes to Kotlin (#4768) 2019-03-24 12:24:40 +00:00
Jake Wharton
1764fe622b Use Throwable.addSuppressed directly
This is available with the new minimum requirements.
2019-03-21 20:35:10 -04: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
dedc6ecd5b Use more AssertJ features 2019-03-14 17:57:42 -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
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
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
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
Yuri Schimke
0b2486f7f3 Make separate IPv4 and IPv6 requests for DNS over HTTPS (#4234)
Make separate requests because DNS in practice does not support multiple questions A + AAAA in a single message.
2018-09-02 19:27:32 +01:00
Yuri Schimke
6cf1f1e75d Enable chantra for DNS over HTTPS testing 2018-08-23 07:45:42 +01:00
Yuri Schimke
d562795f7d DNS over HTTPS spec 13 2018-08-16 17:33:46 +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
Yuri Schimke
00def7aecf Avoid hard conscrypt dep (#4128) 2018-07-11 07:00:22 +01:00
Jesse Wilson
44c2696932 Merge pull request #4124 from square/jwilson.0706.client_certs
Support client authentication in MockWebServer
2018-07-06 16:22:42 -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
Jesse Wilson
d908a676c2 Support client authentication in MockWebServer
Also expose the handshake in the RecordedResponse.

https://github.com/square/okhttp/issues/3934
2018-07-06 10:08:19 -04:00
Jake Wharton
36f4fd04f7 Add parse overload which fails on invalid inputs 2018-07-05 23:18:15 -04:00
Yuri Schimke
aa58436fbf Update cloudflare GET example (#4097)
* Update cloudflare GET example

* add IP example
2018-06-28 22:38:47 -04:00
Yuri Schimke
5b37cda9e0 DNS over HTTPS (#3972)
DNS over HTTPS implementation

experimental API in 3.11
https://tools.ietf.org/html/draft-ietf-doh-dns-over-https-11
2018-06-24 20:29:21 +01:00