Advertisement
Guest User

Untitled

a guest
Dec 6th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. string URL = "http://gridurl.appspot.com/go/e0a86ba9-99d8-4aa7-80b9-b04d42e2fec7";
  3.  
  4. key request;
  5.  
  6. default
  7. {
  8.     touch_start(integer total_number)
  9.     {
  10.         string json = llList2Json(JSON_ARRAY,["this is the message from the client to the server"]);
  11.         request = llHTTPRequest(URL,[HTTP_METHOD,"POST",
  12.                     HTTP_MIMETYPE,"application/json",
  13.                     HTTP_VERBOSE_THROTTLE,FALSE],
  14.                     json);
  15.     }
  16.     http_response(key q,integer status,list meta,string body) {
  17.         if (q == request) {
  18.             if (status != 200) {
  19.                 llOwnerSay("Connection failure");
  20.                 return;
  21.             }
  22.             llOwnerSay("RESPONSE: "+body);
  23.         }
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement