Hi all,

Currently with the HTTP Endpoint it is difficult to handle a large set of
query parameters, and this is doubly so when we have to handle individual
query params when running into encoding related issues.

As an example ESB connectors handle query parameters by using script
mediator to create a long query param string and then passing this on to
the HTTP Endpoint.

The underlying library we use for URI Templates support RFC 6570 including
{?param*} operators which when provided with a map will handle the query
parameters in a cleaner way allowing to group a set of parameters without
having to worry about escaping things like & delimiter.

In addition to this, there are several more operators that can only be
supported by passing a map including: {+param*}, {list*}, {&list*}.

Based on this shall we enable support for these operators in HTTP Endpoint?

We can provide this functionality in the following manner (which is the
least intrusive when we consider changes in dev studio and synapse):

Similar to uri.var prefixed properties we have
uri.map.<map_name>.<entry_key>. This will allow us to generate a set of
maps with a unique map name that we can then use to pass onto to the
template library.

<property name="uri.map.geoloc.lat" value="7° 7' 2.0820'' N" />
<property name="uri.map.geoloc.lng" value="80° 13' 19.8048'' E" />
<property name="uri.var.scheme" value="http://"; />
<property name="uri.var.hostport" value="localhost:8280" />
<property name="uri.var.path" value="/services/Position" />

<http
uri-template=""{+uri.var.scheme}{+uri.var.hostport}{+uri.var.path}{?uri.map.geoloc*}""
/>

Above will result in:
http://localhost:8280/services/Position?lng=80%C2%B0%2013%27%2019.8048%27%27%20E&lat=7%C2%B0%207%27%202.0820%27%27%20N



Thanks,
-- 
*Ravi Undupitiya*
Senior Software Engineer; WSO2 http://wso2.com


*E-mail: r...@wso2.com <http://wso2.com>**M: **+94 772 930 712*

Lean . Enterprise . Middleware
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to