go.stripe icon indicating copy to clipboard operation
go.stripe copied to clipboard

Google App Engine

Open hraban opened this issue 10 years ago • 3 comments

ready to use on GAE platform.

hraban avatar Feb 20 '14 16:02 hraban

Can we get this merged in please?

sanbornm avatar May 09 '14 23:05 sanbornm

I've been thinking about this; there is a minor problem. What if someone sets http.DefaultClient to the client supplied by GAE before every request? This would work before, but my patch caches the http.DefaultClient from stdlib and breaks that. I think it's better to set _httpClient to nil initially, then create an internal getter function. Something like:

func getHttpClient() *http.Client {
    if _httpClient == nil {
        return http.DefaultClient
    }
    return _httpClient
}

that should work transparently for people who don't read the docs and who don't expect this package to do anything GAE specific.

(untested)

hraban avatar May 20 '14 13:05 hraban

PS Im not using this project or its code atm anymore so I can't vouch for this modification; someone who is more into it feel free to make the change, run the tests and make a pull request to my branch

hraban avatar May 20 '14 13:05 hraban