I have come across a common way that http responses arrive in JSON now where the core data is wrapped in a class with a message and status code like so:
Is this the expected way to return results and something more easily handled by .Net.Http ?
It makes it more difficult to deserialize as you have a first step to get the result and another to get the data class in the correct format if result is successful
UnityWebRequest already returns a responseCode so it is odd
I think that’s just a particular web endpoint returning the above shaped object.
Otherwise an endpoint just returns a blob of text, and in this case it happens to be JSON.
But I’m not a network weenie so maybe there’s a new way of doing things these days.
EDIT: I see you edited your post to include the specifics of that endpoint. I have no familiarity with that endpoint but I would start with their docs, which it sounds like maybe you already have?
The responseCode returned by UnityWebRequest has nothing to do with the status in that JSON, it is the HTTP response code. The status in that JSON for UnityWebRequest is just bytes in a larger blob.
I know - it seems someone decided on an extended format defined by json:api which is not necessary (it even has its own content type!). So nevermind - don’t use it!