Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom HTTP header example #748

Closed
tillkruss opened this issue Jan 16, 2024 · 1 comment
Closed

Custom HTTP header example #748

tillkruss opened this issue Jan 16, 2024 · 1 comment
Labels

Comments

@tillkruss
Copy link

I'm sorry to ask for a code sample, total noob here.

How can I request an image that sends a custom HTTP header along with the request?

@tillkruss
Copy link
Author

For anyone searching:

var request = URLRequest(url: "https://example.com")
request.addValue("works", forHTTPHeaderField: "X-Test")

let imageRequest = ImageRequest(urlRequest: request)

LazyImage(request: imageRequest) { state in
    // ...
}

@tillkruss tillkruss closed this as not planned Won't fix, can't repro, duplicate, stale Jan 16, 2024
@kean kean added the question label Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants