[teiid-issues] [JBoss JIRA] (TEIID-3016) Add headers parameter to invokeHttp
Steven Hawkins (JIRA)
issues at jboss.org
Thu Jun 26 10:42:24 EDT 2014
[ https://issues.jboss.org/browse/TEIID-3016?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12979696#comment-12979696 ]
Steven Hawkins edited comment on TEIID-3016 at 6/26/14 10:41 AM:
-----------------------------------------------------------------
Added an optional headers parameter that accepts a JSON clob.
invokeHttp(... headers=>jsonObject('application/json' as ContentType))
The jsonObject and jsonArray functions are helpful for this purpose as we look for a jsonObject with primitive or array of primitive values.
This adds an explicit dependency to the engine (for the JSON handling) but avoids adding another third-party dependency - even if something like httpcore would already exist in AS, it would still increase the embedded footprint.
was (Author: shawkins):
Added an optional headers parameter that accepts a JSON clob.
invokeHttp(... header=>jsonObject('application/json' as ContentType))
The jsonObject and jsonArray functions are helpful for this purpose as we look for a jsonObject with primitive or array of primitive values.
This adds an explicit dependency to the engine (for the JSON handling) but avoids adding another third-party dependency - even if something like httpcore would already exist in AS, it would still increase the embedded footprint.
> Add headers parameter to invokeHttp
> -----------------------------------
>
> Key: TEIID-3016
> URL: https://issues.jboss.org/browse/TEIID-3016
> Project: Teiid
> Issue Type: Enhancement
> Security Level: Public(Everyone can see)
> Components: Misc. Connectors
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 8.8
>
>
> There is a need to set common headers, such as content type and accepts. Since there may be other custom values it probably makes sense to do this as a generic parameter as Ramesh suggests:
> call restBDM.invokeHttp(action => 'POST', endpoint => qp, headers=>'ContentType=application/json;Accepts=application/text')
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
More information about the teiid-issues
mailing list