assert on the response code of the request