Sample code for 30+ languages & platforms
C#

Transition from Http.PBinaryBd to Http.HttpBd

Provides instructions for replacing deprecated PBinaryBd method calls with HttpBd.

Chilkat C# Downloads

C#
bool success = false;

Chilkat.Http http = new Chilkat.Http();

string verb = "POST";
string url = "https://example.com/";
Chilkat.BinData bdRequestBody = new Chilkat.BinData();
string contentType = "application/octet-stream";

//  ------------------------------------------------------------------------
//  The PBinaryBd method is deprecated:

Chilkat.HttpResponse responseObj = http.PBinaryBd(verb,url,bdRequestBody,contentType,false,false);
if (http.LastMethodSuccess == false) {
    Debug.WriteLine(http.LastErrorText);
    return;
}

//  ...
//  ...

//  ------------------------------------------------------------------------
//  Do the equivalent using HttpBd.
//  Your application creates a new, empty HttpResponse object which is passed 
//  in the last argument and filled upon success.

Chilkat.HttpResponse responseOut = new Chilkat.HttpResponse();
success = http.HttpBd(verb,url,bdRequestBody,contentType,responseOut);
if (success == false) {
    Debug.WriteLine(http.LastErrorText);
    return;
}