You are not logged in.
Pages: 1
Compile and execute the following program.
client.pas and server.pas
Run the server and client, and the output is as follows:
# client
--- no routed ---
test GET method
r: 200
resp: {"code": 0}
test POST method
r: 200
resp: {"code": 0}
--- routed ---
test GET method
r: 403
resp: {
"errorCode":403,
"errorText":"URI Authentication Failed: Invalid signature (0)"
}
test POST method
r: 403
resp: {
"errorCode":403,
"errorText":"URI Authentication Failed: Invalid signature (0)"
}Last edited by idigger (2025-10-19 05:30:13)
Offline
Ok, sorry, I just saw the forum rules 2 and 7. The post has been edited.
Last edited by idigger (2025-10-19 05:39:44)
Offline
URI authentication is also not applicable to the following routes.
HttpServer.Route.Run([urmGet, urmPost], '/app/api', Server.domyapi);URI authentication currently does not work with routing.
If you want to use URI authentication, you cannot use routing.
Last edited by idigger (2025-10-21 13:42:49)
Offline
I found that root can be set to the following form and still work without using routing.
Server := TMyServer.Create('myroot/v1');server output
--- myapi ---
url: myapp/v1/myapi?q=abc&v=123&session_signature=000f36e000014ac1e3a96b48
method: mGET
Parameters: q=abc&v=123&session_signature=000f36e000014ac1e3a96b48
body:{"req": "hello"}Last edited by idigger (2025-10-21 14:14:48)
Offline
Pages: 1