Skip to content

How is the URL build in got? Part 3 #1607

Answered by szmarczak
mistercorea asked this question in Q&A
Discussion options

You must be logged in to vote

What about the tests?

got/test/arguments.ts

Lines 38 to 45 in d0cd709

test('`url` should be utf-8 encoded', async t => {
await t.throwsAsync(
got('https://example.com/%D2%E0%EB%EB%E8%ED'),
{
message: 'URI malformed'
}
);
});

https://url.spec.whatwg.org/#percent-encoded-bytes

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by szmarczak
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
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
Converted from issue

This discussion was converted from issue #1606 on February 12, 2021 08:54.