I in the middle of testing my API wrapper to make sure everything was still working properly. In the documentation it says that a HTTP status should be returned following the operation. When I tested my Unfollow method everything worked, except I’m always getting a null object back even when the operation was successful. The same situation occurs when unblocking a user.
public class HTTPInfo
{
[JsonProperty("error")]
public string http_error { get; set; }
[JsonProperty("status")]
public int http_status { get; set; }
[JsonProperty("message")]
public string http_message { get; set; }
}
I’m not sure if this is another quirk with the new API or something on my end. The HTTPInfo model works in every other method as a derived class, and even when I set the return type as just an object, it is still null.
DELETE on kraken endpoints returns 204 No Content when it succeeds. As perhaps obvious, 204 comes with empty response body, which turns into a null variable in your code. You should check the response code instead of attempting to unnecessarily parse the response.