13

can curl be used on google app engine ?

Bunny Rabbit
  • 8,213
  • 16
  • 66
  • 106

5 Answers5

13

No. To make HTTP requests, you need to use the urlfetch service.

urllib, urllib2, and httplib on App Engine are patched to transparently use this API for you, so any third-party module that does HTTP requests using one of these standard modules will work.

The 'c' in cURL is there because the library is written in C; cURL interfaces in other languages (like pycurl) use the libcurl library, and can't be use on App Engine, as modules that reply on C extensions are not allowed.

Wooble
  • 87,717
  • 12
  • 108
  • 131
5

I would recommand using the URL fetch service. For example in python

from google.appengine.api import urlfetch

url = "http://www.google.com/"
result = urlfetch.fetch(url)
if result.status_code == 200:
  doSomethingWithResult(result.content)
Oliv
  • 71
  • 1
  • 3
4

The answers to this are a bit dated. cURL totally works on GAE now. We are using it a number of places in our PHP application that is hosted on GAE.

wogsland
  • 9,106
  • 19
  • 57
  • 93
1

Take a look at Twitter4J http://twitter4j.org/en/index.html - specifically mentions App Engine support.

Rori Stumpf
  • 1,912
  • 19
  • 26
1

It's a real old question and I end up here, so someone else might as well.

App Egine supports cURL requests.

Follow the docs https://cloud.google.com/appengine/docs/standard/php/issue-requests

purush
  • 559
  • 3
  • 12