Sample code for 30+ languages & platforms
Unicode C++

Transition from Http.S3_DeleteMultipleObjects to Http.S3_DeleteObjects

Provides instructions for replacing deprecated S3_DeleteMultipleObjects method calls with S3_DeleteObjects.

Chilkat Unicode C++ Downloads

Unicode C++
#include <CkHttpW.h>
#include <CkStringArrayW.h>
#include <CkStringTableW.h>
#include <CkHttpResponseW.h>

void ChilkatSample(void)
    {
    bool success = false;

    CkHttpW http;

    const wchar_t *bucketName = L"testBucket";

    CkStringArrayW sa;
    sa.Append(L"starfish.jpg");
    sa.Append(L"clam.jpg");
    sa.Append(L"shark.jpg");

    CkStringTableW st;
    st.Append(L"starfish.jpg");
    st.Append(L"clam.jpg");
    st.Append(L"shark.jpg");

    //  ------------------------------------------------------------------------
    //  The S3_DeleteMultipleObjects method is deprecated:

    CkHttpResponseW *responseObj = http.S3_DeleteMultipleObjects(bucketName,sa);
    if (http.get_LastMethodSuccess() == false) {
        wprintf(L"%s\n",http.lastErrorText());
        return;
    }

    //  ...
    //  ...

    delete responseObj;

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

    CkHttpResponseW responseOut;
    success = http.S3_DeleteObjects(bucketName,st,responseOut);
    if (success == false) {
        wprintf(L"%s\n",http.lastErrorText());
        return;
    }
    }