Amazon Product Advertising API Developer's Manual page 65

Api version 2011-08-01
Table of Contents

Advertisement

Product Advertising API Developer Guide
These unreserved characters are A-Z, a-z, 0-9, hyphen ( - ), underscore ( _ ), period ( . ), and
tilde ( ~ ).
• Percent encode extended UTF-8 characters in the form %XY%ZA....
• Percent encode the space character as %20 (and not +, as common encoding schemes do).
• Percent encode all other characters with %XY, where X and Y are hex characters 0-9 and
uppercase A-F.
Perl Note:
The commonly used URI::Escape CPAN module uses RFC 2396. This has five
additional reserved characters: asterisk ( * ), left and right parenthesis ( ( and ) ),
single quote ( ' ) and exclamation ( ! ). To follow RFC 3986 use:
URI::Escape::uri_escape( $parameter_value, "^A-Za-z0-9\-_.~" )
Java Note:
URLEncoder uses + for space, and won't encode asterisk ( * ) , and encodes tilda (
~ ) when not necessary. To follow RFC 3986 use:
URLEncoder.encode(value, UTF_8_Encoding).replace("+",
"%20").replace("*", "%2A").replace("%7E", "~");
C# Note:
Use uppercase hex characters.
Tip
Currently all Product Advertising API service parameter names use unreserved
characters, so you don't need to encode them. However, you might want to include
code to handle parameter names that use reserved characters, for possible future use.
c.
Separate the encoded parameter names from their encoded values with the equals sign ( = )
(ASCII character 61), even if the parameter value is empty.
d.
Separate the name-value pairs with an ampersand ( & ) (ASCII code 38).
2.
Create the string to sign according to the following pseudo-grammar (the "\n" represents an ASCII
newline).
StringToSign = HTTPVerb + "\n" +
ValueOfHostHeaderInLowercase + "\n" +
HTTPRequestURI + "\n" +
CanonicalizedQueryString <from the preceding step>
The HTTPRequestURI component is the HTTP absolute path component of the URI up to, but not
including, the query string. If the HTTPRequestURI is empty, use a forward slash ( / ).
Request Authentication
API Version 2011-08-01
58

Advertisement

Table of Contents
loading

Table of Contents