Im trying to rewrite something ive written in Visual Basic that uses an XMLHTTP ‘GET’ request. How do I do this in AppleScript? I can only seem to find information about ‘POST’ requests, which require input/output parameters but I want just the XML that going to this url should output.
Share
One option would be to just use curl:
do shell script "curl --get --data-urlencode q=" & quoted form of "whatever" & " http://ajax.googleapis.com/ajax/services/search/web?v=1.0" without altering line endingswithout altering line endingsdoesn’t convert LF to CR or chomp the last newlinequoted form of "it's"→'it'\''s'curl --get(-G) sends--data/--data-binary/--data-urlencodeas a GET request instead of the default POSTcurl --data-urlencode name=valueadds a percent-encoded parameterIf the parameters don’t need to be escaped:
do shell script "curl http://stackoverflow.com/search?q=curl" without altering line endings