Skip to content

How can i receive request (headers, host, absolute url) in my custom class (service)? #1745

Answered by thetutlage
sasha172017 asked this question in Help
Discussion options

You must be logged in to vote

There is no global request in AdonisJS and not possible in Node.js at all. You will have to pass it to the service constructor or the method you are calling

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@sasha172017
Comment options

Answer selected by RomainLanz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants