Chilkat Online Tools

C++ / Belvo API Docs / Destroy

Back to Collection Items

#include <CkHttp.h>
#include <CkHttpResponse.h>

void ChilkatSample(void)
    {
    // This example assumes the Chilkat API to have been previously unlocked.
    // See Global Unlock Sample for sample code.

    CkHttp http;
    bool success;

    http.put_BasicAuth(true);
    http.put_Login("{{secretId}}");
    http.put_Password("{{secretPassword}}");

    CkHttpResponse *resp = http.QuickRequest("DELETE","https://domain.com/investments/portfolios/:id/");
    if (http.get_LastMethodSuccess() == false) {
        std::cout << http.lastErrorText() << "\r\n";
        return;
    }

    std::cout << resp->get_StatusCode() << "\r\n";
    std::cout << resp->bodyStr() << "\r\n";
    delete resp;
    }

Curl Command

curl -X DELETE
	-u '{{secretId}}:{{secretPassword}}'
https://domain.com/investments/portfolios/:id/

Postman Collection Item JSON

{
  "name": "Destroy",
  "request": {
    "method": "DELETE",
    "header": [
    ],
    "url": {
      "raw": "{{baseUrl}}/investments/portfolios/:id/",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "investments",
        "portfolios",
        ":id",
        ""
      ],
      "variable": [
        {
          "key": "id",
          "value": null
        }
      ]
    }
  },
  "response": [
  ]
}