0 votes

i need to access a web content using token how to put one in httprequest

Godot version latest
in Engine by (14 points)

1 Answer

+1 vote

If this is a JSON Web Token or a similar mechanism, you need to pass the Authorization HTTP header in your request with the value Bearer (your token here).

You can pass custom headers to HTTPRequest's request() function with the optional second parameter which is an array of strings of the form Key: Value.

by (12,343 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.