how to get http Response Type?

Dear all

I am using WM 7.1 .2
I placed pub.flow:getTransportInfo in my flow service.
I used that to retrieves information about the protocol from which the current service was invoked.
But I couldn’t get the http response type, if it is a “POST”, “GET”,“PUSH” or “DELETE”.

NEED HELP :confused:

Regards

Hi Amir,
getTransportInfo will not provide you the HTTP Response, rather it will tell you what type of content it can accept,host information, content length,content type. If you are posting data using HTTP protocol the use pub.client:http. Use this servise to post the data and the same service will tell you the status of HTTP POST/GET/PUSH/DELETE method.

Thank you Sir for replying

I am sorry I am not that much familiar with the http request or response stuff.
but what I want to know is the http method requested by the user if it is POST/GET/PUSH/DELETE

Thanks again

IS does not support PUT nor DELETE when invoking an IS service. An HTTP client that tries to use those will receive an error in response. In the context of what IS is for, those actions do not make sense.

POST and GET are supported but IS tries to abstract away the difference between those two. The service that is invoked doesn’t know nor care which was used.

Might I inquire as to what you’re looking to achieve by knowing which HTTP action was used? That might help the group identify possible approaches.

We are trying to implement a REST interface.
Some of the resources / services are accessible through GET, some through POST. A GET is a retrieve, a POST is an insert. I therefore need to know the method so that I can return the proper HTTP Status Code and Reason.

I don’t think you’re going to be able to provide a RESTful interface with IS. One of the main REST constraint, identifying resources via URI, won’t be something that is easily supported without significant custom work–if it is doable at all.

Ummm, then I have to figure another way