HTTP GET syntax question (solved)

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 8.

Moderator: Benj

viktor_au
Posts: 122
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 21 times
Been thanked: 31 times
Contact:

HTTP GET syntax question (solved)

Postby viktor_au » Mon Oct 14, 2019 12:26 am

Example works OK (with matrix team example)
"GET /en/observation/rss/2647632 HTTP/1.1\nHost: weather-broker-cdn.api.bbci.co.uk\n\n"
I have 200 OK.


When I try to access the RPi3 Apache2 server by:

changing the address to: 192.168.1.100
changing the GET to: "GET /index3.html HTTP/1.1\n"

The WireShark program does not show the HTTP request, only TCP from my PC.
The WireShark shows only one HTTP line: from Apache2 (RPi3 server)


RPi3 Apache 2 does response:
HTTP/1.1 400 Bad Request.

What is the correct syntax for GET in FC8 for accessing:
/var/www/html/index3.htm
please?

"GET /html/index3.html HTTP/1.1\n"
-----------------
P.S.
When I use the browser
http://192.168.1.100/index3.html
I got the result:
test testing
Last edited by viktor_au on Mon Oct 14, 2019 1:19 am, edited 1 time in total.

viktor_au
Posts: 122
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 21 times
Been thanked: 31 times
Contact:

Re: HTTP GET syntax question

Postby viktor_au » Mon Oct 14, 2019 12:37 am

Found an answer:
request = "GET /index3.html HTTP/1.1\r\nHost: 192.168.1.100\r\n\r\n"

Now I can get Apache2 response: 200 OK.
But not enough room to get the text from index3.html

viktor_au
Posts: 122
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 21 times
Been thanked: 31 times
Contact:

Re: HTTP GET syntax question

Postby viktor_au » Mon Oct 14, 2019 1:19 am

Solved.
Attachments
Apache2ResponseILI.jpg
Apache2ResponseILI.jpg (61.2 KiB) Viewed 235 times
Ard_HttpGet_RPi3_7.fcfx
(33.08 KiB) Downloaded 14 times
These users thanked the author viktor_au for the post:
Benj (Mon Oct 14, 2019 10:13 am)
Rating: 5.26%