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

input must not start with a slash when using prefixUrl #1869

Closed
1 task done
JounQin opened this issue Sep 13, 2021 · 7 comments
Closed
1 task done

input must not start with a slash when using prefixUrl #1869

JounQin opened this issue Sep 13, 2021 · 7 comments

Comments

@JounQin
Copy link

JounQin commented Sep 13, 2021

What would you like to discuss?

got('//at.alicdn.com/t/font_1626314_1ym8doilp1d.js')

Checklist

  • I have read the documentation.

The error message seems not clear.

@szmarczak
Copy link
Collaborator

This is fixed in beta. Please fill in the issue template properly next time.

@JounQin
Copy link
Author

JounQin commented Sep 13, 2021

@szmarczak

This is fixed in beta. Please fill in the issue template properly next time.

image

@szmarczak
Copy link
Collaborator

Ah, this should be a bug report since you didn't provide a prefixUrl.

The message in Got 12 says that you mustn't provide a leading slash at all.

@JounQin
Copy link
Author

JounQin commented Sep 13, 2021

I think error is acceptable but the error message is not clear, so I raised this issue as a question instead of a bug.

@szmarczak
Copy link
Collaborator

`input` must not start with a slash

this is very clear. Your input is //at.alicdn.com/t/font_1626314_1ym8doilp1d.js and it starts with a slash, hence the error.

@JounQin
Copy link
Author

JounQin commented Sep 13, 2021

The confusing part is prefixUrl...

Let's don't waste time on this...😂

@szmarczak
Copy link
Collaborator

The confusing part is prefixUrl...

It's a Got option.

Ah, this should be a bug report since you didn't provide a prefixUrl.

Let me rephrase: you didn't provide a prefixUrl, yet still got an error saying you did. The prefixUrl part is removed from the message in Got 12.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants