{"action":"created","issue":{"url":"https://api.github.com/repos/dogenzaka/go-iap/issues/30","repository_url":"https://api.github.com/repos/dogenzaka/go-iap","labels_url":"https://api.github.com/repos/dogenzaka/go-iap/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/dogenzaka/go-iap/issues/30/comments","events_url":"https://api.github.com/repos/dogenzaka/go-iap/issues/30/events","html_url":"https://github.com/dogenzaka/go-iap/issues/30","id":177620136,"number":30,"title":"Google App Engine compatibility","user":{"login":"pjebs","id":5377970,"avatar_url":"https://avatars.githubusercontent.com/u/5377970?v=3","gravatar_id":"","url":"https://api.github.com/users/pjebs","html_url":"https://github.com/pjebs","followers_url":"https://api.github.com/users/pjebs/followers","following_url":"https://api.github.com/users/pjebs/following{/other_user}","gists_url":"https://api.github.com/users/pjebs/gists{/gist_id}","starred_url":"https://api.github.com/users/pjebs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pjebs/subscriptions","organizations_url":"https://api.github.com/users/pjebs/orgs","repos_url":"https://api.github.com/users/pjebs/repos","events_url":"https://api.github.com/users/pjebs/events{/privacy}","received_events_url":"https://api.github.com/users/pjebs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-18T00:35:22Z","updated_at":"2016-09-18T00:46:30Z","closed_at":null,"body":"# Introduction\r\n\r\nGoogle App Engine is a sandboxed environment. We can't make calls to the outside world without using the `net/http`'s `Request` to create a `http.Client` by:\r\n\r\n```\r\nimport (\r\n        \"net/http\"\r\n\r\n        \"google.golang.org/appengine\"\r\n        \"google.golang.org/appengine/urlfetch\"\r\n)\r\nctx := appengine.NewContext(r)\r\nclient := urlfetch.Client(ctx)\r\n```\r\n\r\nWithout doing that, the library doesn't work.\r\n\r\nThe way Stripe-Go-Library handles it is like this: https://github.com/stripe/stripe-go#google-appengine\r\n\r\nBasically Stripe allows Google App Engine users the ability to feed in their own `http Client` and the library will then use that.\r\n\r\n```\r\n\tctx := appengine.NewContext(r)\r\n\thttpClient := urlfetch.Client(ctx)\r\n\r\n\tsc := client.New(key, stripe.NewBackends(httpClient))\r\n```\r\n\r\nThe way I handle it is like this:\r\n\r\nhttps://github.com/pjebs/optimus-go/blob/master/gae.go\r\nhttps://github.com/pjebs/optimus-go/blob/master/standalone.go\r\n\r\nMy way may be a lot easier to implement.\r\n\r\nIn your code, everytime you refer to a http Client, you instead call: `client()` from the files above.\r\n\r\nThere will be no affect to the rest of your code.\r\n\r\n# More information\r\n\r\nhttps://cloud.google.com/appengine/docs/go/issue-requests\r\nhttps://cloud.google.com/appengine/docs/go/urlfetch/reference"},"comment":{"url":"https://api.github.com/repos/dogenzaka/go-iap/issues/comments/247816810","html_url":"https://github.com/dogenzaka/go-iap/issues/30#issuecomment-247816810","issue_url":"https://api.github.com/repos/dogenzaka/go-iap/issues/30","id":247816810,"user":{"login":"pjebs","id":5377970,"avatar_url":"https://avatars.githubusercontent.com/u/5377970?v=3","gravatar_id":"","url":"https://api.github.com/users/pjebs","html_url":"https://github.com/pjebs","followers_url":"https://api.github.com/users/pjebs/followers","following_url":"https://api.github.com/users/pjebs/following{/other_user}","gists_url":"https://api.github.com/users/pjebs/gists{/gist_id}","starred_url":"https://api.github.com/users/pjebs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pjebs/subscriptions","organizations_url":"https://api.github.com/users/pjebs/orgs","repos_url":"https://api.github.com/users/pjebs/repos","events_url":"https://api.github.com/users/pjebs/events{/privacy}","received_events_url":"https://api.github.com/users/pjebs/received_events","type":"User","site_admin":false},"created_at":"2016-09-18T00:46:30Z","updated_at":"2016-09-18T00:46:30Z","body":"Since you are using `gorequest` library @L102(https://github.com/dogenzaka/go-iap/blob/master/appstore/validator.go#L102)\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"pjebs"}}