Replies: 1 comment
-
You can provide your headers to the const client = new Client(`http://localhost:${server.address().port}`)
const { statusCode, body } = await client.request({
path: '/',
method: 'GET',
headers: {
'user-agent': 'foo bar'
}
}) Checkout the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How can i set a custom
user-agent
header for requests?Also is it possible to allow redirections?
I find the docs very hard for new
undici
users like meBeta Was this translation helpful? Give feedback.
All reactions