Request incompletely sent from arduino ethernet to webserver

Hello everyone.

I have an arduino ethernet connected to a local webserver and try to make a GET-request with the following data via the ethernet.h. library:

client.println("GET /api/test" " HTTP/1.1");
client.println("Host: " SERVER_NAME ":" xstr(SERVER_PORT));
client.println("Accept: application/json");
client.println("Connection: close");

I can debug the connection on server side and everything arrives correctly EXCEPT the first line ("GET /api/test HTTP/1.1").

Does anyone have a clue on what could be wrong? I would like to debug this but I did not find the place in code where the "client.print" actually happens - maybe there is an error posting the first line which I did not notice.

Thanks so much for all your input.
Steffen

Does anyone have a clue on what could be wrong?

Sure. There is something wrong with your code - the part you didn't bother showing us.