During normal program flow, you may need to modify your application or
augment the server data sources, such as a database, with new content. To
meet this need, OpenSocial makes available an
http request method through the standard
Developers can use this method to make RESTful requests (GET, PUT, POST, DELETE) between the application and the server to alter their state without impacting the user experience.
The methods you can use to make these requests are all under the
osapi.http object and
In addition to the URL to make the
http request to, there are a number of
parameters you can introduce within these request calls. They are listed
in Table 6-2.
Table 6-2. http request parameters
method to use when sending data to the server. This
value may be
For PUT and POST requests. The data to be sent to the server from the request.
The format of the data
returned. This value may be
Optional headers to send with the data request.
The service element
in the gadget spec to use for the request. Default
is an empty string (
The OAuth token to use in the request. Default is an empty string