Hi ,
I have used both Delphi Rest Debugger and TMS Webcore WebHttpRequest to test with my
backend server but can i find out why it acted differently and i could not get the same result ,
In my rest debugger , i have added :
method : Get
url : http//172.16.244.1:8069/api/user
request header parameter , i have added the 2 headers param below ,
access-token=mytoken_123 ,content-type=application/x-www-form-urlencoded
and i got ALL my expected result ,
1. my python backend server , i set the debugger for a break point and it works.
2. the result responded also correct ,
But in my TMS Webcore , i used TWebHttpRequest component ,
i set it in my delphi code as follow ,
self.RestRequestConn.Headers.Clear;
self.RestRequestConn.Headers.Add('content-type=application/x-www-form-urlencoded');
self.OdooRestRequestConn.Headers.Add('access-token=mytoken_123');
self.OdooRestRequestConn.Command := httpGET;
1. i expecting the python backend server breakpoint will work too , but it didn't
so my answer to it is that , because my TMS webcore application is running in it's
web server which did not trigger the break point in my python backend server ,
is that correct ?
2. the python backend log file responded with the detail as follow TMS Webcore application,
werkzeug: 172.16.244.189 - - [04/Feb/2019 03:07:35] "OPTIONS /api/res.users HTTP/1.1" 405
which it is different from the one called by Delphi REST Debugger ,
werkzeug: 172.16.244.189 - - [04/Feb/2019 03:11:56] "GET /api/res.users HTTP/1.1" 200 -
as i noticed the response with "OPTIONS" instead of "GET" , why it did not get the GET keywords,
so i suspect the TWebHTTPRequest , is not working and are not sending even the
HTTP command correctly or is there anything i have done wrong ?