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

Études 12-1 et seq. -- NOAA website returns 403 #46

Open
MatthewMDavis opened this issue Jul 17, 2016 · 1 comment
Open

Études 12-1 et seq. -- NOAA website returns 403 #46

MatthewMDavis opened this issue Jul 17, 2016 · 1 comment

Comments

@MatthewMDavis
Copy link

Études 12-1, 12-2 and 12-3 can't be completed anymore. The server at NOAA returns a 403 now.

@FrogBomb
Copy link
Contributor

FrogBomb commented Aug 13, 2016

It looks like the website is suddenly really particular about headers. I basically just copied all the headers my browser was using, and turned it into a request in elixir. I eventually cut it down to just the User-Agent header, and it still worked. The book should probably update to include the needed header. As for now, this worked using :httpc.request/4 (I just put in the url for the station "KSJC" in this instance):

:httpc.request(:get,
               {'http://w1.weather.gov/xml/current_obs/KSJC.xml',  
                [ {'User-Agent','Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36'} ]}, [], [])

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