Forums

500 error occurs while trying to access a site with a GET method

Hello,

I am a newby with little web programming experience with python. Currently, I am trying to access a public page on Facebook with a GET method that returns json data. But every time I tries, I encounter an error that reads "The following error was encountered while trying to retrieve the URL: https://graph.facebook.com/nytimes/posts?

Unsupported Request Method and Protocol

Squid does not support all request methods for all access protocols. For example, you can not POST a Gopher request."

What am I doing wrong?

Thanks,

What library are you using to access the page? There used to be a problem with requests getting https pages that gave an error message like that, but we upgraded it a week or two back and that should have fixed the problem.

I am using urllib. Do I need to use a different one? Thanks for your help.

urllib should work. But I recommend requests, it has a particularly nice API and we make absolutely sure that it works with free accounts.

(All libraries work with paid accounts, of course, as they connect directly to the Internet. It's only free accounts that go via the proxy.)

Thanks for your answer!

No problem :-)