Class ApiResponse
API の応答。本文は JSON として解析済み(JSON でなければ Json は null)で、 生のバイト列・テキストと HttpResponseMessage も参照できます。
public sealed class ApiResponse
- Inheritance
-
ApiResponse
- Inherited Members
Constructors
ApiResponse(HttpResponseMessage, byte[])
public ApiResponse(HttpResponseMessage http, byte[] bytes)
Parameters
httpHttpResponseMessagebytesbyte[]
ApiResponse(HttpResponseMessage, string)
public ApiResponse(HttpResponseMessage http, string text)
Parameters
httpHttpResponseMessagetextstring
Properties
Array
Json を配列として。
public JsonArray? Array { get; }
Property Value
Bytes
本文の生のバイト列。Jetfuel(/i/jfapi/)のようにバイナリを返すエンドポイントはこちらを読みます
(Text は UTF-8 として復号したものなので、バイナリは壊れます)。
public byte[] Bytes { get; }
Property Value
- byte[]
Http
public HttpResponseMessage Http { get; }
Property Value
Json
本文を JSON として解析したもの。JSON でなければ null。
public JsonNode? Json { get; }
Property Value
Object
Json をオブジェクトとして。
public JsonObject? Object { get; }
Property Value
StatusCode
public int StatusCode { get; }
Property Value
Text
本文のテキスト(UTF-8)。
public string Text { get; }