C# 클래스 ConoHaNet.Extensions.ResponseExtensions

Contains extension methods to the Response class.
파일 보기 프로젝트 열기: crowdy/OpenStack-ConoHa

공개 메소드들

메소드 설명
HasJsonBody ( this response ) : bool

This method checks if a REST Response contains a JSON-formatted body. The response is assumed to be JSON if the content type is reported as application/json and the body is not empty.

TryGetHeader ( this response, HttpResponseHeader header, string &value ) : bool

Retrieves a standard HTTP response header from a REST response, if available.

TryGetHeader ( this response, string header, string &value ) : bool

Retrieves a custom HTTP response header from a REST response, if available.

메소드 상세

HasJsonBody() 공개 정적인 메소드

This method checks if a REST Response contains a JSON-formatted body. The response is assumed to be JSON if the content type is reported as application/json and the body is not empty.
public static HasJsonBody ( this response ) : bool
response this The REST response.
리턴 bool

TryGetHeader() 공개 정적인 메소드

Retrieves a standard HTTP response header from a REST response, if available.
is .
public static TryGetHeader ( this response, HttpResponseHeader header, string &value ) : bool
response this The REST response.
header HttpResponseHeader The header to retrieve.
value string Returns the value for .
리턴 bool

TryGetHeader() 공개 정적인 메소드

Retrieves a custom HTTP response header from a REST response, if available.
is .
public static TryGetHeader ( this response, string header, string &value ) : bool
response this The REST response.
header string The header to retrieve.
value string Returns the value for .
리턴 bool