daily pastebin goal
22%
SHARE
TWEET

Untitled

a guest Aug 12th, 2017 44 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  /*  SA-MP threaded HTTP/1.0 client for pawn
  2.  *
  3.  *  (c) Copyright 2010, SA-MP Team
  4.  *
  5.  */
  6.  
  7. // HTTP requests
  8. #define HTTP_GET                        1
  9. #define HTTP_POST                       2
  10. #define HTTP_HEAD                       3
  11.  
  12. // HTTP error response codes
  13. // These codes compliment ordinary HTTP response codes returned in 'response_code'
  14. // (10x) (20x OK) (30x Moved) (40x Unauthorised) (50x Server Error)  
  15. #define HTTP_ERROR_BAD_HOST             1
  16. #define HTTP_ERROR_NO_SOCKET            2
  17. #define HTTP_ERROR_CANT_CONNECT         3
  18. #define HTTP_ERROR_CANT_WRITE           4
  19. #define HTTP_ERROR_CONTENT_TOO_BIG      5
  20. #define HTTP_ERROR_MALFORMED_RESPONSE   6
  21.  
  22. native HTTP(index, type, url[], data[], callback[]);
  23.  
  24. // example HTTP callback: public MyHttpResponse(index, response_code, data[]) { ... }
RAW Paste Data
Top