Skip to content

[Coil3] HTTP headers : Confused by the documentation #2558

Answered by colinrtwhite
RobbWatershed asked this question in Q&A
Discussion options

You must be logged in to vote

Sorry, that recipes page needs to be updated. Here's an example of how to set headers for a request in Coil 3.0:

val headers = NetworkHeaders.Builder()
    .set(key, value)
    .build()
val request = ImageRequest.Builder(context)
    .data(url)
    .httpHeaders(headers)
    .build()

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@RobbWatershed
Comment options

Answer selected by RobbWatershed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants