#1 2012-03-10 03:08:50

profh
Member
Registered: 2010-07-02
Posts: 159

is it able to use post instead of get methord?

when TSQLite3HttpClient(Client).CallBackGetResult was called,httpserver got the aParams value using "GET" methord with "url",

is it able to use post instead of get methord,so httpserver gets the aParams value using "POST" methord with "incontent"?

sometimes the length limit is a problem.

Offline

#2 2012-03-10 21:19:17

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,182
Website

Re: is it able to use post instead of get methord?

In the current implementation, you can use CallBacks methods with GET and PUT (with ModelRoot/MethodName URI).

POST is reserved for interface-based services.

So if you use PUT, you can sent the HTTP body directly from the client into the server, with no size limit (except the HTTP server itself).

Offline

#3 2012-03-11 03:26:20

profh
Member
Registered: 2010-07-02
Posts: 159

Re: is it able to use post instead of get methord?

thanks,i got it.

Offline

#4 2012-04-07 08:57:34

profh
Member
Registered: 2010-07-02
Posts: 159

Re: is it able to use post instead of get methord?

Would you change the code of function "TSQLRestClientURI.CallBackPut" in SQLite3Commons.pas:

from:
    ...
    result := URI(Model.getURICallBack(aMethodName,aTable,aID),
      'PUT',nil,aResponseHead,@aSentData).Lo;
    ...

to:
    ...
    result := URI(Model.getURICallBack(aMethodName,aTable,aID),
      'PUT',@aResponse,aResponseHead,@aSentData).Lo;
    ...

so as i can get aParams.Resp when i use CallBackPut.

Offline

#5 2012-04-08 08:14:24

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,182
Website

Re: is it able to use post instead of get methord?

TSQLRestClientURI.CallBackPut() will now return any HTTP response content (even if it is not HTTP/1.1 compliant, and not work over some networks).

See http://synopse.info/fossil/info/9dcb4681ce

Offline

#6 2012-04-08 09:14:07

profh
Member
Registered: 2010-07-02
Posts: 159

Re: is it able to use post instead of get methord?

many thanks.

Offline

Board footer

Powered by FluxBB