Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Missing rmPut and rmDelete for TRequest Method
Fri, May 11 2012 8:21 AMPermanent Link

Mark Brooks

Slikware

Avatar

Tim,

I'm having plenty success accessing our REST API using EWB but have just stumbled upon a real surprise ie. no apparent support for HTTP PUT or DELETE?

Can you advise?

Thanks
Mark
Fri, May 11 2012 8:54 AMPermanent Link

Raul

Team Elevate Team Elevate

Mark,

I have not tried this but you should be able to just add rmPUT and
rmDELETE constants into webhttp.

Modify the TServerRequest.GetMethodName function so it returns the
proper names.

Underlying TXMLHttpRequest is called with the MethodName function as 1st
param so as long as it returns PUT or DELETE things should work

Raul


On 5/11/2012 8:21 AM, Mark Brooks wrote:
> Tim,
>
> I'm having plenty success accessing our REST API using EWB but have just stumbled upon a real surprise ie. no apparent support for HTTP PUT or DELETE?
>
> Can you advise?
>
> Thanks
> Mark
>
Fri, May 11 2012 12:59 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Raul,

<< I have not tried this but you should be able to just add rmPUT and
rmDELETE constants into webhttp. >>

That is correct - the changes are as follows for the next build:

const

  { Request methods }

  rmGet = 0;
  rmPost = 1;
  rmHead = 2;
  rmPut = 3;
  rmDelete = 4;

implementation

function TServerRequest.GetMethodName: String;
begin
  case FMethod of
     rmGet:
        Result:='GET';
     rmPost:
        Result:='POST';
     rmHead:
        Result:='HEAD';
     rmPut:
        Result:='PUT';
     rmDelete:
        Result:='DELETE';
     else
        Result:='';
     end;
end;

Thanks,

Tim Young
Elevate Software
www.elevatesoft.com
Fri, May 11 2012 5:08 PMPermanent Link

Mark Brooks

Slikware

Avatar

Raul,

Thanks for the hint

Tim

Thanks for the update

I can confirm that I've made these changes as a temporary fix and it works perfectly.

Mark
Image