Using HTTPClient to Integrate Backend Systems

If a secure connection vias HTTPS is established the used server certificate needs to be signed by one of the Salesforce B2C Commerce supported CAs and must not be self-signed. You might find it useful to create an HTTPClient to perform POSTS or DELETES, which are not supported by the WebDAVClient. There are no file size limits for HTTPClient.

The HTTPClient class supports the following HTTP methods:

Note: Because the B2C Commerce WebDAV client doesn't support POST or delete features, you might want to use HTTPClient within a secure HTTPS connection to post or delete files.
 var httpClient : HTTPClient = new HTTPClient();
 var message : String;'GET', '');

 if (httpClient.statusCode == 200)
      message = httpClient.text;
     // error handling
     message="An error occured with status code "+httpClient.statusCode;