Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 298291 - [OpenSocial] makeRequest's parameters management
Summary: [OpenSocial] makeRequest's parameters management
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 4.1   Edit
Assignee: Benjamin Cabé CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-21 06:18 EST by Sebastien Moran CLA
Modified: 2011-05-17 16:23 EDT (History)
1 user (show)

See Also:


Attachments
makeRequest opt_params support (10.16 KB, patch)
2009-12-21 06:19 EST, Sebastien Moran CLA
contact: iplog+
Details | Diff
reworked patch (13.82 KB, patch)
2010-01-06 11:41 EST, Benjamin Cabé CLA
no flags Details | Diff
reworked patch (13.82 KB, patch)
2010-01-06 11:45 EST, Benjamin Cabé CLA
no flags Details | Diff
mylyn/context/zip (38.34 KB, application/octet-stream)
2010-01-06 11:45 EST, Benjamin Cabé CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastien Moran CLA 2009-12-21 06:18:44 EST
The actual implementation of the OpenSocialView does not handle the "opt_params" parameter of the gadgets.io.makeRequest(...) function. It always performs a GET method only using the URL.

Herewith you'll find a patch partially implementing support of the "opt_params" parameter : 
* Supported "opt_params" : 
** gadgets.io.RequestParameters.METHOD
** gadgets.io.RequestParameters.POST_DATA
* Partially supported : 
** gadgets.io.RequestParameters.CONTENT_TYPE
*** DOM, TEXT and JSON contentTypes are supported
*** FEED contentType needs to be implemented
** gadgets.io.RequestParameters.HEADERS
*** At the moment I only retrieve the "Authorization" & "ContentType" headers ... I need a generic way to loop through the headers' array ...


I have tested that code with gadgets retrieving data through SOAP protocol.
Comment 1 Sebastien Moran CLA 2009-12-21 06:19:25 EST
Created attachment 154869 [details]
makeRequest opt_params support
Comment 2 Benjamin Cabé CLA 2010-01-06 11:41:31 EST
Created attachment 155420 [details]
reworked patch

There were minor issues with the way the patch dealt with headers. I've also extracted the custom "makeXHR" BrowserFunction in a dedicated package.

Thanks for this contribution, Sebastien!
Hopefuly, this is one of the last time we write our homebrew JS: we need to leverage Shindig! :)
Comment 3 Benjamin Cabé CLA 2010-01-06 11:45:33 EST
Created attachment 155421 [details]
reworked patch

There were minor issues with the way the patch dealt with headers. I've also extracted the custom "makeXHR" BrowserFunction in a dedicated package.

Thanks for this contribution, Sebastien!
Hopefuly, this is one of the last time we write our homebrew JS: we need to leverage Shindig! :)
Comment 4 Benjamin Cabé CLA 2010-01-06 11:45:57 EST
Created attachment 155422 [details]
mylyn/context/zip
Comment 5 Benjamin Cabé CLA 2010-01-06 11:47:45 EST
Released in HEAD > 20100106

Thanks again, Sebastien!