Get request, DOESNT WORK, arduino web api in xml

Hello everyone,

I’m trying to make a project where a barcode (an array of 20 char ) will be send to a db via a web api made in xml.The api returns a false or true(if this barcode is included in the db or not). I didn’t make the api. I have only its path(see picture below).

My problem is that when i run my code i have a bad request, of the GET . I’m not sure if i have to use GET or POST, although i read a lot of stuff about this and if it is GET, i’m not sure i’m requesting it in the wright way.
I use an arduino uno and a wiznet w5200 ethernet shield.

Here is my code and the picture of the path of the webapi.

Generally can i send parameters through a GET request to a db or not??And if its not and i have to use a POST, where can i read something about posting it with the wright syntax???

Thanks in advance, waiting for any advise or help

WebClient1.ino (4.41 KB)

Just now i realised and changed on big mistake in my code. I shouldn’t use port 80, but port 7772 of my server, as the name says ;D ;D …now the GET request is ok. My question now is if it is possible, instead of the number of the barcode, to put a parameter inside the get request.

Here is my code again and a photo of the servers response.

Please anyone with a good advise??


WebClient1.ino (4.43 KB)

Again, it is me talking to my self... :D it was more simple than i could imagine.. The wright syntax is the following, where barcode is an array of char declared earlier.

I'm posting it in case someone else has the same questions as me..

client.print("GET /WcfDataService1.svc/CheckCardBC/"); client.print(barcode); client.println(" HTTP/1.1"); client.println("Host:"); client.println("Connection: close"); client.println();