Skip to content

Instantly share code, notes, and snippets.

@FriedEgg
Forked from cjdinger/TLaPD_ApiCall.sas
Last active August 29, 2015 14:15
Show Gist options
  • Save FriedEgg/e7040bec24717a5598dd to your computer and use it in GitHub Desktop.
Save FriedEgg/e7040bec24717a5598dd to your computer and use it in GitHub Desktop.
/*
This SAS program uses the ARRPI translator at:
http://isithackday.com/arrpi.php
To translate whatever English text you supply into
Pirate speak for Talk Like a Pirate Day
This is a modification of the posting by Chris Hemedinger
to use PROC DS2 and the HTTP Package in place of PROC HTTP
*/
proc ds2;
data _null_;
method run();
declare package http client();
declare varchar(1024) body;
declare int rc;
client.createGetMethod('http://isithackday.com/arrpi.php?text=' || urlencode(%tslit(%superq(text))));
client.executeMethod();
client.getResponseBodyAsString(body, rc);
put body;
end;
enddata;
run;
quit;
/* output:
Avast, SAS users be ye best
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment