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

http module returns 403 error without user agent #435

Open
ithan opened this issue Feb 16, 2020 · 0 comments
Open

http module returns 403 error without user agent #435

ithan opened this issue Feb 16, 2020 · 0 comments

Comments

@ithan
Copy link

ithan commented Feb 16, 2020

Hello! Today I was having some trouble figuring out why my HTTP request wasn't working, every time that I tried to request something, it would return a 403 error, after doing some testing, I found that you need to set a User-Agent to prevent this issue, to do that, just add the following line to the quest.js file at scriptcraft/modules/http:
conn.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.29 Safari/537.36");

at line 112, after the

conn.requestMethod = requestMethod;
after that, it should work just fine!

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

1 participant