Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined headers attribute on os:HttpRequest #1282

Open
mmarum-sugarcrm opened this issue Jun 5, 2013 · 0 comments
Open

Undefined headers attribute on os:HttpRequest #1282

mmarum-sugarcrm opened this issue Jun 5, 2013 · 0 comments

Comments

@mmarum-sugarcrm
Copy link
Member

Original author: [email protected] (April 11, 2012 00:00:10)

SPECIFICATION BUGS ONLY - Description
=====================================
Section 14.4 of Core-Gadget currently specifies... that os:HttpRequest "MUST support all of the fields in HTTP-Request-Params as attributes."

One of the HTTP-Request-Params is "HEADERS" which is defined as a Map<String,String>. Unfortunately, the spec does not define how to represent a Map<String,String> as the value of an attribute making it impossible to completely meet this requirement in an interoperable way. We need a way of representing headers in XML format if we're going to continue supporting this option at all.

There are two options...

  1. JSON-Stringify the Map<String,String> and use that as the XML attribute value which is "simple" but ugly as hell, or
  2. Provide a more structured approach to defining the request parameters associated with the request: e.g. instead of using attributes, we can use Param elements...

<os:HttpRequest key="..." method="get" href="...">
<os:Param name="format" value="text" />
<os:Param name="headers">
<os:Param name="X-Foo-Header" value="blah blah blah" />
<os:Param name="Prefer" value="lenient" />
</os:Param>
</os:HttpRequest>

(http://docs.opensocial.org/display/OSD/Request+Headers+with+DataPipeline+HttpRequest)

Document affected:
==================
1.) Please attach a patch for the document if appropriate.
2.) Post a thread at
http://groups.google.com/group/opensocial-and-gadgets-spec/topics
linking to this issue report.
3.) Post a comment on this issue, linking back to the thread.

Original issue: http://code.google.com/p/opensocial-resources/issues/detail?id=1298

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant