Constructor HttpResponse
HttpResponse()
Creates an new HttpResponse instance with HTTP OK status code and no content.
public HttpResponse()
HttpResponse(HttpStatusCode)
Creates an new HttpResponse instance with given status code.
public HttpResponse(HttpStatusCode status)
Parameters
status
HttpStatusCodeThe HttpStatusCode of this HTTP response.
HttpResponse(int)
Creates an new HttpResponse instance with given status code.
public HttpResponse(int status)
Parameters
status
intThe status code of this HTTP response.
HttpResponse(int, HttpContent?)
Creates an new HttpResponse instance with given status code and HTTP content.
public HttpResponse(int status, HttpContent? content)
Parameters
status
intThe status code of this HTTP response.
content
HttpContentThe response content, if any.
HttpResponse(HttpContent?)
Creates an new HttpResponse instance with given HTTP content, with default status code as 200 OK.
public HttpResponse(HttpContent? content)
Parameters
content
HttpContentThe response content, if any.
HttpResponse(string)
Creates an new HttpResponse instanec with given string content and status code as 200 OK.
public HttpResponse(string stringContent)
Parameters
stringContent
stringThe UTF-8 string content.
HttpResponse(HttpStatusCode, HttpContent?)
Creates an new HttpResponse instance with given status code and HTTP contents.
public HttpResponse(HttpStatusCode status, HttpContent? content)
Parameters
status
HttpStatusCodeThe HttpStatusCode of this HTTP response.
content
HttpContentThe response content, if any.
HttpResponse(in HttpStatusInformation)
Creates an new HttpResponse instance with given status code.
public HttpResponse(in HttpStatusInformation status)
Parameters
status
HttpStatusInformationThe HttpStatusInformation of this HTTP response.