2
0

testclient.pl 453 B

12345678910111213141516171819
  1. use FSSCGI;
  2. my $handle = new FSSCGI::SCGIhandle();
  3. $handle->addParam( "REQUEST_METHOD", "POST");
  4. $handle->addParam( "REQUEST_URI", "/deepthought");
  5. $handle->addParam( "TESTING", "TRUE");
  6. $handle->addParam( "TESTING", "TRUE");
  7. $handle->addBody("What is the answer to life?");
  8. if ((my $response = $handle->sendRequest("127.0.0.1", 7777, 10000))) {
  9. print "RESP[$response]\n";
  10. } else {
  11. print "ERROR!\n";
  12. }