Esempio n. 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ApiResponse{T}" /> class.
 /// </summary>
 /// <param name="statusCode">HTTP status code.</param>
 /// <param name="headers">HTTP headers.</param>
 /// <param name="data">Data (parsed HTTP body)</param>
 public ApiResponse(HttpStatusCode statusCode, Multimap <string, string> headers, T data) : this(statusCode, headers, data, null)
 {
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ApiException"/> class.
 /// </summary>
 /// <param name="errorCode">HTTP status code.</param>
 /// <param name="message">Error message.</param>
 /// <param name="errorContent">Error content.</param>
 /// <param name="headers">HTTP Headers.</param>
 public ApiException(int errorCode, string message, object errorContent = null, Multimap <string, string> headers = null) : base(message)
 {
     this.ErrorCode    = errorCode;
     this.ErrorContent = errorContent;
     this.Headers      = headers;
 }