| Did this page help you? Yes No Tell us about it... |
One of the values of using REST is that its syntax is simple, which makes REST requests easy to read. This section summarizes all of the REST syntax rules that you must keep in mind when creating a REST request.
Because a REST request is a URL, there can be no spaces between the parts of a request. A browser
will stop reading when it runs across the first space. For example, if the last parameter read,
Keywords=Blue Shirts, the request would end on "Blue." "Shirts"
would never be read. If you have key words, such as names, that do have spaces in them, you must
URL-encode the space using %20. For the preceding example to work, you would include a URL-encoded
space, as follows.
Keywords=Blue%20Shirts
The same problem occurs if you put spaces between the parameters in a request, as shown in the following example.
SearchIndex=Apparel& Keywords=Shirt
In this example, the request would end with "Apparel&." Often, this kind of mistake returns an error because parameters required by the operation are not read. So, make sure to remove all spaces within a request.