Scotty: `reqHeader` not in scope

I am using Scotty to create a webserver and I need to get Authorisation header.
Tutorials say to use reqHeader but I am getting an error saying it’s not defined.
I have opened an issue as well but no one is there to help.

Can anyone help me with this?

I went looking for something similar to what you are looking for on the scotty docs on hackage and found the function header.

1 Like

Since you’re looking at a tutorial last updated in 2014, it’s a good idea to browse the change logs for the relevant library. Not everybody keeps a good change log, but most bigger packages do. On the main page for the scotty package on Hackage, there’s a “changelog” link near the top in the right column. So there you can see that reqHeader was renamed to header and deprecated in version 0.7.0, and then removed in version 0.8.0.

1 Like