http GET
TurnipTruck
Posts: 1,485
Could someone please give me the correct syntax for a string to send to a device that responds to URLs from withing a browser? Thanks.
0
Comments
Yields the expected results
Send_String Devive,"'GET http://192.168.1.3/lots_of_modifier_stuff',$0D,$0A,$0D,$0A"
Returns a 400 bad request.
???
Thanks.
The IP address goes into your ip_client_open statement. The correct send string would then be:
Keep in mind that the server may require more of a complete header. You can use ethereal, url sniffer, or plugins like firebug (firefox) to view the exact headers that you are sending an receiving with your browser if you need more clarification.
Here are all of the available fields in the header: http://en.wikipedia.org/wiki/List_of_HTTP_headers
Most devices we talk to really on the GET or POST, Host, Authorization (if password protected), or Content-Length.
If you use Firefox, check out the LiveHeaders add-in - it shows headers and all the commands (GET, POST, etc) on a connection.
Where host is the site, eg. 'www.amx.com'
and path is everything after e.g 'products'
Forgot to mention this one: Modify Headers
It allows you to change the headers that are sent whenever you browse a page. So, with the two (LiveHeaders and Modify Headers) you can act as though you're an AMX master, sending only a few specified headers along with your commands, and then you can see what you get back. Sort of a pain to get it all set up the way you want, but can save some time if you're debugging skills / tools aren't the best.