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); }
public GatewayApi(IOptions <HttpApiOptions> options, HttpApiClient apiClient) { this.options = options; this.apiClient = apiClient; }