Chilkat Online Tools

unicodeC / MeiliSearch v0.24 / Reset sortable attributes

Back to Collection Items

#include <C_CkHttpW.h>
#include <C_CkHttpResponseW.h>

void ChilkatSample(void)
    {
    HCkHttpW http;
    BOOL success;
    HCkHttpResponseW resp;

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

    http = CkHttpW_Create();

    CkHttpW_SetRequestHeader(http,L"X-Meili-Api-Key",L"masterKey");

    resp = CkHttpW_QuickRequest(http,L"DELETE",L"http://localhost:7700/indexes/indexUID/settings/sortable-attributes");
    if (CkHttpW_getLastMethodSuccess(http) == FALSE) {
        wprintf(L"%s\n",CkHttpW_lastErrorText(http));
        CkHttpW_Dispose(http);
        return;
    }

    wprintf(L"%d\n",CkHttpResponseW_getStatusCode(resp));
    wprintf(L"%s\n",CkHttpResponseW_bodyStr(resp));
    CkHttpResponseW_Dispose(resp);


    CkHttpW_Dispose(http);

    }

Curl Command

curl -X DELETE
	-H "X-Meili-Api-Key: masterKey"
http://localhost:7700/indexes/indexUID/settings/sortable-attributes

Postman Collection Item JSON

{
  "name": "Reset sortable attributes",
  "request": {
    "method": "DELETE",
    "header": [
    ],
    "url": {
      "raw": "{{url}}/indexes/{{indexUID}}/settings/sortable-attributes",
      "host": [
        "{{url}}"
      ],
      "path": [
        "indexes",
        "{{indexUID}}",
        "settings",
        "sortable-attributes"
      ]
    }
  },
  "response": [
  ]
}