It seems to me we may not be able to do this use case for post requests
with empty content.

@ESB Team - Let us know if there is a way to handle this?

On Wed, Nov 2, 2016 at 5:36 PM, Keerthika Mahendralingam <[email protected]
> wrote:

> Hi All,
>
> Dropbox backend service expecting a POST request with empty body and
> without Content-Type header for download method[1].
>
> I am unable to remove the Content-Type header from the request. Is there
> any way to do this?
>
> I tried with the following:
> <header name="Content-Type" scope="transport" action="remove"/>
> It is working for GET methods but not for POST one.
>
> If I use <property name="messageType" scope="axis2" value=""/>, content
> type is set as null but it is sending "<jsonObject/>" in the body.
>
> Please find the configuration I used:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <proxy xmlns="http://ws.apache.org/ns/synapse";
>        name="testProxy"
>        startOnLoad="true"
>        statistics="disable"
>        trace="disable"
>        transports="https,http">
>    <target>
>       <inSequence>
>           <payloadFactory media-type="json">
>               <format></format>
>               <args></args>
>           </payloadFactory>
>           <property name="messageType" 
> value="application/x-www-form-urlencoded"
> scope="axis2"></property>
>           <property name="FORCE_POST_PUT_NOBODY" value="true"
> scope="axis2" type="BOOLEAN"></property>
>           <call>
>               <endpoint>
>                     <http method="post" uri-template="https://content.
> dropboxapi.com/2/files/download"/>
>               </endpoint>
>          </call>
>       </inSequence>
>    </target>
>    <description/>
> </proxy>
>
> [1]. https://www.dropbox.com/developers/documentation/http/
> documentation#files-download
>
> Thanks,
> --
> <[email protected]>
> Keerthika Mahendralingam
> Software Engineer
> Mobile :+94 (0) 776 121144
> [email protected]
> WSO2, Inc.
> lean . enterprise . middleware
>



-- 

Best Regards,

Malaka Silva
Senior Technical Lead
M: +94 777 219 791
Tel : 94 11 214 5345
Fax :94 11 2145300
Skype : malaka.sampath.silva
LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
Blog : http://mrmalakasilva.blogspot.com/

WSO2, Inc.
lean . enterprise . middleware
https://wso2.com/signature
http://www.wso2.com/about/team/malaka-silva/
<http://wso2.com/about/team/malaka-silva/>
https://store.wso2.com/store/

Don't make Trees rare, we should keep them with care
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to