Unable to send webhook command - invalid method

I have a LUA system (Girder, granddaddy home automation), and I need to send a message to Home Assistant. I set up a webhook automation to test, but even if the address works from a browser, it doesn’t work from Girder. The code in Girder is:
socket.http.request ('http://192.168.1.101:8123/api/webhook/testtest')

And the error message I get is:

Invalid method encountered:

  b'0'
    ^

I have not been able to understand wat the description of the error means. I have set the automation to accept GET, HEAD, POST, PUT and I have removed the tick in the box to only accept local network. Does anybody have any idea what the invalid method can mean?