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
Google App Engine compatibility #30
Comments
Since you are using You can see that gorequest exposes the You can use the approach I used above so that for non-GAE, the function above literally re-returns the For the GAE version, it can grab the |
I think it's not as simple since the client this library creates has the jsonKey baked in. This seems to be how to get it running on GAE:
|
I'm doing app store verification manually. But to get play store verification working, I copied the playstore/validator.go to my project and edited it. Gist here: https://gist.github.com/mltucker/db4df00918d7b917f49b60012b615c02 |
Introduction
Google App Engine is a sandboxed environment. We can't make calls to the outside world without using the
net/http
'sRequest
to create ahttp.Client
by:Without doing that, the library doesn't work.
The way Stripe-Go-Library handles it is like this: https://github.com/stripe/stripe-go#google-appengine
Basically Stripe allows Google App Engine users the ability to feed in their own
http Client
and the library will then use that.The way I handle it is like this:
https://github.com/pjebs/optimus-go/blob/master/gae.go
https://github.com/pjebs/optimus-go/blob/master/standalone.go
My way may be a lot easier to implement.
In your code, everytime you refer to a http Client, you instead call:
client()
from the files above.There will be no affect to the rest of your code.
More information
https://cloud.google.com/appengine/docs/go/issue-requests
https://cloud.google.com/appengine/docs/go/urlfetch/reference
The text was updated successfully, but these errors were encountered: