예제 #1
0
        public async Task GetGateway(CancellationToken cancellationToken = default)
        {
            var method      = HttpMethod.Get;
            var path        = "/gateway";
            var uri         = HttpApiClient.BuildUri(options.Value.BaseUrl, path);
            var request     = new HttpRequestMessage(method, uri);
            var authHash    = apiClient.GetAuthHash();
            var methodBytes = Encoding.ASCII.GetBytes(method.Method);
            var pathBytes   = Encoding.ASCII.GetBytes(path);
            var operation   = authHash.Concat(methodBytes).Concat(pathBytes).ToArray();

            await apiClient.SendRequest(operation, request, cancellationToken);
        }
예제 #2
0
 public GatewayApi(IOptions <HttpApiOptions> options, HttpApiClient apiClient)
 {
     this.options   = options;
     this.apiClient = apiClient;
 }