Re: [Dev] Unable to send payload with delete request in ESB connector

2014-10-06 Thread Udara Liyanage
Hi Vanji,

Extracting from HTTP spec[1]

A message-body MUST NOT be included in a request if the specification of
the request method (section 5.1.1
) does not
allow sending an entity-body in requests. *A server SHOULD read and forward
a message-body on any reques*t; if the request method does not include
defined semantics for an entity-body, then the message-body SHOULD be
ignored when handling the request.

According to the ESB should pass the message body in any case , ignoring
the body is up to the backend.

[1] http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.3
[2]
http://stackoverflow.com/questions/14323716/restful-alternatives-to-delete-request-body

On Tue, Oct 7, 2014 at 11:21 AM, Keerthika Mahendralingam <
keerth...@wso2.com> wrote:

> Hi Udara,
> For that particular request we need to send the resource id in request
> body as a json array. In their api method we can't send the id via url.
> like specified here:
> https://developer.spotify.com/web-api/remove-tracks-playlist/
>
> On Tue, Oct 7, 2014 at 8:43 AM, Udara Liyanage  wrote:
>
>>
>> Hi,
>>
>> You are sending a DELETE request means to delete a particular resource
>> from the system. You can define which resource to be deleted in url by
>> id/name or any other identifier of the resource. Why you need to send a
>> payload in a DELETE request?
>>
>>
>> Touched, not typed. Erroneous words are a feature, not a typo.
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> 
> Keerthika Mahendralingam
> Associate Software Engineer
> Mobile :+94 (0) 776 121144
> keerth...@wso2.com 
>



-- 

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Unable to send payload with delete request in ESB connector

2014-10-06 Thread Keerthika Mahendralingam
Hi Udara,
For that particular request we need to send the resource id in request body
as a json array. In their api method we can't send the id via url.
like specified here:
https://developer.spotify.com/web-api/remove-tracks-playlist/

On Tue, Oct 7, 2014 at 8:43 AM, Udara Liyanage  wrote:

>
> Hi,
>
> You are sending a DELETE request means to delete a particular resource
> from the system. You can define which resource to be deleted in url by
> id/name or any other identifier of the resource. Why you need to send a
> payload in a DELETE request?
>
>
> Touched, not typed. Erroneous words are a feature, not a typo.
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

Keerthika Mahendralingam
Associate Software Engineer
Mobile :+94 (0) 776 121144
keerth...@wso2.com 
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Unable to send payload with delete request in ESB connector

2014-10-06 Thread Udara Liyanage
Hi,

You are sending a DELETE request means to delete a particular resource from
the system. You can define which resource to be deleted in url by id/name
or any other identifier of the resource. Why you need to send a payload in
a DELETE request?


Touched, not typed. Erroneous words are a feature, not a typo.
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Unable to send payload with delete request in ESB connector

2014-10-06 Thread Vanjikumaran Sivajothy
Yes ESB will drop the body of the DELETE request. Please refer to the
previous dev mail subjected on [1]. Furthermore, spec[2] claim that "A
payload within a DELETE request message has no defined semantics"

[1] [Dev]moving httpcore dependency to git
[2]
http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-26#section-4.3.5


On Mon, Sep 22, 2014 at 2:23 PM, Firzhan Naqash  wrote:

> Hi,
>
> Can you attach your wired carbon log along with the synapse configuration.
>
> Regards,
> Firzhan
>
> On Mon, Sep 22, 2014 at 2:36 PM, Keerthika Mahendralingam <
> keerth...@wso2.com> wrote:
>
>> When I sent delete request with json payload I got the following message:
>> "Empty JSON body."
>>
>> I also tried with the hardcoded values. But I got the same error message.
>>
>> --
>> 
>> Keerthika Mahendralingam
>> Associate Software Engineer
>> Mobile :+94 (0) 776 121144
>> keerth...@wso2.com 
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Sivajothy Vanjikumaran
*Senior Software Engineer*
*Integration Technologies Team*
*WSO2 Inc. http://wso2.com *
*Mobile:(+94)777219209*
[image: Facebook]  [image: Twitter]
 [image: LinkedIn]
 [image:
Blogger]  [image: SlideShare]


This communication may contain privileged or other confidential information
and is intended exclusively for the addressee/s. If you are not the
intended recipient/s, or believe that you may have received this
communication in error, please reply to the sender indicating that fact and
delete the copy you received and in addition, you should not print,
copy, re-transmit, disseminate, or otherwise use the information contained
in this communication. Internet communications cannot be guaranteed to be
timely, secure, error or virus-free. The sender does not accept liability
for any errors or omissions
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Unable to send payload with delete request in ESB connector

2014-09-22 Thread Firzhan Naqash
Hi,

Can you attach your wired carbon log along with the synapse configuration.

Regards,
Firzhan

On Mon, Sep 22, 2014 at 2:36 PM, Keerthika Mahendralingam <
keerth...@wso2.com> wrote:

> When I sent delete request with json payload I got the following message:
> "Empty JSON body."
>
> I also tried with the hardcoded values. But I got the same error message.
>
> --
> 
> Keerthika Mahendralingam
> Associate Software Engineer
> Mobile :+94 (0) 776 121144
> keerth...@wso2.com 
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Unable to send payload with delete request in ESB connector

2014-09-22 Thread Keerthika Mahendralingam
When I sent delete request with json payload I got the following message:
"Empty JSON body."

I also tried with the hardcoded values. But I got the same error message.

-- 

Keerthika Mahendralingam
Associate Software Engineer
Mobile :+94 (0) 776 121144
keerth...@wso2.com 
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev