Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The HTTP/2 functions are used to exchange data over HTTP/2 as a client. However, the functions can also be used for HTTP/1.

...

This function uses the GET method to retrieve content from an HTTP server.

Code Block
stringResponse httpGet
    ( string host,
      string path,
      string protocol,			    //Optional
      int port,                     //Optional
      boolean secure,               //Optional
      int requestTimeout,           //Optional
      int connectionTimeout,        //Optional
      string username,              //Optional
      string password,              //Optional
      map<string, string> headers ) //Optional

...

This function uses the POST method to send content to an HTTP/2 server and receives the response.

Code Block
stringResponse httpPost
    ( string host, 
      string path,		
      bytearray content, 
      string contentType,
      string protocol,			    //Optional
      int port,                     //Optional 
 	  boolean secure,               //Optional 
      int requestTimeout,           //Optional
      int connectionTimeout,        //Optional 
      string username,              //Optional
      string password,              //Optional
      map<string, string> headers ) //Optional

...

This function makes an HTTP request and uses the specified method, for example GET, POST, and PUT.

Code Block
stringResponse httpReq
    ( string method,	
	  string host,	
      string path,
      bytearray content,
      string contentType, 
	  string protocol,			    //Optional
	  int port,					    //Optional
	  boolean secure,			    //Optional
      int requestTimeout,		    //Optional
	  int connectionTimeout,	    //Optional
	  string username,			    //Optional
	  string password, 			    //Optional
      map<string,string> headers )//Optional

...

This function uses the POST method to send multipart binary contents to an HTTP server and receives the response.

Code Block
bytearrayResponse httpMultipartPost
    ( string host,
	  string path,
	  list<MultipartSegmentUDR> content,
	  string protocol,			    //Optional
   	  int port, 				    //Optional 
	  boolean secure,			    //Optional
      int requestTimeout,		    //Optional
	  int connectionTimeout,	    //Optional
      string username,              //Optional
      string password,              //Optional
      map<string, string> headers ) //Optional

...


If you do not set these two properties, the Java Default Truststore is used.


Scroll pagebreak