MediaTailor
Toggle table of contents
1.0.4
android
apple
common
Platform filter
android
apple
common
Switch theme
Search in API
MediaTailor
MediaTailor
/
com.amazon.mediatailorsdk.network
Package-level
declarations
Types
Functions
Types
Network
Client
Link copied to clipboard
class
NetworkClient
Params
Link copied to clipboard
typealias
Params
=
HashMap
<
String
,
Any
>
Resource
Link copied to clipboard
data
class
Resource
<
out
T
>
(
val
status
:
Resource.Status
,
val
data
:
T
?
=
null
,
val
message
:
String
?
=
null
,
val
error
:
Throwable
?
=
null
,
val
requestTime
:
Long
=
0
,
val
responseTime
:
Long
=
0
)
Functions
http
Client
Link copied to clipboard
android
apple
common
actual
fun
httpClient
(
config
:
HttpClientConfig
<
*
>
.
(
)
->
Unit
)
:
HttpClient
actual
fun
httpClient
(
config
:
HttpClientConfig
<
*
>
.
(
)
->
Unit
)
:
HttpClient
expect
fun
httpClient
(
config
:
HttpClientConfig
<
*
>
.
(
)
->
Unit
)
:
HttpClient
safe
Get
Link copied to clipboard
inline suspend
fun
<
T
>
HttpClient
.
safeGet
(
url
:
String
,
params
:
Params
=
hashMapOf()
)
:
Resource
<
T
>
safe
Post
Link copied to clipboard
inline suspend
fun
<
T
,
P
>
HttpClient
.
safePost
(
url
:
String
,
data
:
P
,
extraHeaders
:
Map
<
String
,
String
>
?
=
null
)
:
Resource
<
T
>
to
Response
Link copied to clipboard
inline suspend
fun
<
T
>
HttpResponse
.
toResponse
(
)
:
Resource
<
T
>