HttpResponseMessage

The dynamic object we get in response to a HTTP method has one more trick to make things syntactically convenient - the returned HttpResponseMessage is attached to the dynamic type making it easy to access things like the status code.

Note you can also cast the result to a HttpResponseMessage too e.g. user as HttpResponseMessage See Casting.

Example usage:

dynamic client = new RestClient("http://jsonplaceholder.typicode.com");

var user = await client.Users.Get(1);

Assert.That(user.HttpResponseMessage.StatusCode, Is.EqualTo(HttpStatusCode.OK));

This works for any content returned not just JSON. The HttpContent is already disposed (see disposing) if you want access the returned content string call ToString().