del

Synopsis

Send a DELETE request to a device

Parameters

Parameter Description
std::string serial Serial number of the product for which to receive the request
std::string path URL of the request
std::function<void(Response&)> fn Calback function with response from the request

Example

Delete a user from the device

altronix::AtxNet net{};

net.del(
    "B3445ED2CDr2AC33298CXdd443",
    "/ATX/userManagement/users/john",
    [=](altronix::Response& response) {
        if(response.error != LINQ_ERROR_OK) {
          std::cout << "Received error!\n" << response.error;
        }else {
          std::cout << response.response << "\n";
        }
});

See Also

  1. send