10.10.2018 Views

sqs-dg-2009-02-01

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Amazon Simple Queue Service Developer Guide<br />

Query Request Authentication<br />

Example SendMessage Request Using POST<br />

POST /queue2 HTTP/1.1<br />

Host: <strong>sqs</strong>.us-east-1.amazonaws.com<br />

Content-Type: application/x-www-form-urlencoded<br />

Action=SendMessage<br />

&MessageBody=Your+Message+Text<br />

&Version=<strong>2009</strong>-<strong>02</strong>-<strong>01</strong><br />

&Expires=2008-<strong>02</strong>-10T12%3A00%3A00Z<br />

&SignatureVersion=2<br />

&SignatureMethod=HmacSHA256<br />

&AWSAccessKeyId=<br />

Following is the string to sign. Notice that you encode the spaces as %20 (and not plus signs) when you<br />

form the string to sign.<br />

POST\n<br />

<strong>sqs</strong>.us-east-1.amazonaws.com\n<br />

/queue2\n<br />

AWSAccessKeyId=<br />

&Action=SendMessage<br />

&Expires=2008-<strong>02</strong>-10T12%3A00%3A00Z<br />

&MessageBody=Your%20Message%20Text<br />

&SignatureMethod=HmacSHA256<br />

&SignatureVersion=2<br />

&Version=<strong>2009</strong>-<strong>02</strong>-<strong>01</strong><br />

Following is the signed request.<br />

POST /queue2 HTTP/1.1<br />

Host: <strong>sqs</strong>.us-east-1.amazonaws.com<br />

Content-Type: application/x-www-form-urlencoded<br />

Action=SendMessage<br />

&MessageBody=Your+Message+Text<br />

&Version=<strong>2009</strong>-<strong>02</strong>-<strong>01</strong><br />

&Expires=2008-<strong>02</strong>-10T12%3A00%3A00Z<br />

&SignatureVersion=2<br />

&SignatureMethod=HmacSHA256<br />

&AWSAccessKeyId=<br />

&Signature=URLEncode(Base64Encode(Signature))<br />

API Version <strong>2009</strong>-<strong>02</strong>-<strong>01</strong><br />

26

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!