Skip to content

Instantly share code, notes, and snippets.

@sinmetal
Created September 13, 2017 10:41
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sinmetal/6fcf769aeda42aa3485c994c32a2d020 to your computer and use it in GitHub Desktop.
Save sinmetal/6fcf769aeda42aa3485c994c32a2d020 to your computer and use it in GitHub Desktop.
Cloud PubSub Push Request Memo

App Engine StandardでCloud Pub/SubのPush Requestを受けた時のRequestの内容。 Headerに認証のTokenを入れるみたいなのはないっぽいので、やりたいなら、BodyのAttributesに適当にToken入れる感じだろうか。

Request Header

  • Content-Length = [284]
  • Accept-Charset = [UTF-8]
  • X-Appengine-Country = [ZZ]
  • X-Cloud-Trace-Context = [b637a4a25755adafd922090e3c844cee/379846021913007296]
  • Host = [sinmetal-pubsub.appspot.com]
  • User-Agent = [CloudPubSub-Google]
  • Content-Type = [application/json]

Request Body

{
	"message": {
		"data": "SGVsbG8gQ2xvdWQgUHViL1N1Yg==",
		"attributes": {},
		"message_id": "153364794594948",
		"messageId": "153364794594948",
		"publish_time": "2017-09-13T10:32:37.328Z",
		"publishTime": "2017-09-13T10:32:37.328Z"
	},
	"subscription": "projects/sinmetal-pubsub/subscriptions/pushsubscription"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment