API stopt working: respons is empty in my Delphi app

Hello,

Suddenly my API-application does not work anymore. Monday no problems, now no response.
On our side nothing has changed.

Did something change perhaps?

with curl I get the following response:

  • Trying 94.75.202.62:443…
  • Connected to api.routexl.com (94.75.202.62) port 443 (#0)
  • schannel: disabled automatic use of client certificate
  • schannel: ALPN, offering http/1.1
  • schannel: ALPN, server accepted to use http/1.1
  • Server auth using Basic with user ‘Marbello’

POST /tour/ HTTP/1.1
Host: api routexl com
Authorization: Basic [removed]
User-Agent: curl/7.79.1
Accept: /
Content-Type: application/json
Content-Length: 118

  • Mark bundle as not supporting multiuse
    < HTTP/1.1 401 Unauthorized
    < Server: nginx
    < Date: Wed, 16 Apr 2025 14:36:30 GMT
    < Content-Type: text/html;charset=UTF-8
    < Content-Length: 0
    < Connection: keep-alive
    < X-Powered-By: PHP/7.4.33
    < Www-Authenticate: Basic msg=“Protected”
  • Authentication problem. Ignoring this.
  • Connection #0 to host api.routexl.com left intact

It may be special characters in passwords creating problems. We’ve pushed a fix to solve that. Can you confirm and try again?

The problem was that I did not Encode the locations
Changing my old code:
RequestBody := TStringStream.Create(sLocaties);
try
ResponseBody := IdHTTP1.Post(‘https://api.routexl.com/tour/’,RequestBody) ;

to :

Params.Add(‘locations=’ + TNetEncoding.URL.Encode(sLocaties));
try
ResponseBody := IdHTTP1.Post(‘https://api.routexl.com/tour/’, Params);

solved it.

HOWEVER:

My customer just told me that everything is working fine again (without the fix!)

So the old code is working again?!

Can you confirm that? Did something change back?
And is it wise to deploy the fix to my customer?

kind regards,

Dirk Janssens.

If the problems suddenly started yesterday without any change from your side, the old code is probably working again.

There was a server update on our side that gave problems in authentication, that has been solved last night.

We’re no Delphi experts but your fix seems more in line with our API documentation. But for reasons of stability we could agree with a policy to not fix what ain’t broken.