@@ -6,6 +6,8 @@ import com.fasterxml.jackson.databind.json.JsonMapper
66import com.withorb.api.client.OrbClientAsync
77import com.withorb.api.client.OrbClientAsyncImpl
88import com.withorb.api.core.ClientOptions
9+ import com.withorb.api.core.http.Headers
10+ import com.withorb.api.core.http.QueryParams
911import java.net.Proxy
1012import java.time.Clock
1113import java.time.Duration
@@ -36,6 +38,8 @@ class OrbOkHttpClientAsync private constructor() {
3638
3739 fun clock (clock : Clock ) = apply { clientOptions.clock(clock) }
3840
41+ fun headers (headers : Headers ) = apply { clientOptions.headers(headers) }
42+
3943 fun headers (headers : Map <String , Iterable <String >>) = apply {
4044 clientOptions.headers(headers)
4145 }
@@ -46,6 +50,8 @@ class OrbOkHttpClientAsync private constructor() {
4650 clientOptions.putHeaders(name, values)
4751 }
4852
53+ fun putAllHeaders (headers : Headers ) = apply { clientOptions.putAllHeaders(headers) }
54+
4955 fun putAllHeaders (headers : Map <String , Iterable <String >>) = apply {
5056 clientOptions.putAllHeaders(headers)
5157 }
@@ -58,6 +64,8 @@ class OrbOkHttpClientAsync private constructor() {
5864 clientOptions.replaceHeaders(name, values)
5965 }
6066
67+ fun replaceAllHeaders (headers : Headers ) = apply { clientOptions.replaceAllHeaders(headers) }
68+
6169 fun replaceAllHeaders (headers : Map <String , Iterable <String >>) = apply {
6270 clientOptions.replaceAllHeaders(headers)
6371 }
@@ -66,6 +74,8 @@ class OrbOkHttpClientAsync private constructor() {
6674
6775 fun removeAllHeaders (names : Set <String >) = apply { clientOptions.removeAllHeaders(names) }
6876
77+ fun queryParams (queryParams : QueryParams ) = apply { clientOptions.queryParams(queryParams) }
78+
6979 fun queryParams (queryParams : Map <String , Iterable <String >>) = apply {
7080 clientOptions.queryParams(queryParams)
7181 }
@@ -78,6 +88,10 @@ class OrbOkHttpClientAsync private constructor() {
7888 clientOptions.putQueryParams(key, values)
7989 }
8090
91+ fun putAllQueryParams (queryParams : QueryParams ) = apply {
92+ clientOptions.putAllQueryParams(queryParams)
93+ }
94+
8195 fun putAllQueryParams (queryParams : Map <String , Iterable <String >>) = apply {
8296 clientOptions.putAllQueryParams(queryParams)
8397 }
@@ -90,6 +104,10 @@ class OrbOkHttpClientAsync private constructor() {
90104 clientOptions.replaceQueryParams(key, values)
91105 }
92106
107+ fun replaceAllQueryParams (queryParams : QueryParams ) = apply {
108+ clientOptions.replaceAllQueryParams(queryParams)
109+ }
110+
93111 fun replaceAllQueryParams (queryParams : Map <String , Iterable <String >>) = apply {
94112 clientOptions.replaceAllQueryParams(queryParams)
95113 }
0 commit comments