|
Kinetica C# API
Version 7.2.3.1
|
Abstraction over the raw HTTP POST layer. More...
Inheritance diagram for IHttpTransport:Public Member Functions | |
| byte [] | Post (string url, byte[] body, string contentType, string? authorization, CancellationToken cancellationToken) |
| Synchronous POST. More... | |
| Task< byte[]> | PostAsync (string url, byte[] body, string contentType, string? authorization, CancellationToken cancellationToken) |
| Asynchronous POST. More... | |
Abstraction over the raw HTTP POST layer.
Default implementation uses HttpClientTransport; tests can inject a fake.
Definition at line 10 of file IHttpTransport.cs.
| byte [] IHttpTransport.Post | ( | string | url, |
| byte [] | body, | ||
| string | contentType, | ||
| string? | authorization, | ||
| CancellationToken | cancellationToken | ||
| ) |
Synchronous POST.
Blocks the calling thread until the response is received.
| url | Full URL to POST to |
| body | Request body bytes |
| contentType | Content-Type header value |
| authorization | Authorization header value (optional) |
| cancellationToken | Cancellation token |
Implemented in HttpClientTransport.
| Task<byte[]> IHttpTransport.PostAsync | ( | string | url, |
| byte [] | body, | ||
| string | contentType, | ||
| string? | authorization, | ||
| CancellationToken | cancellationToken | ||
| ) |
Asynchronous POST.
Returns a task that completes when the response is received.
Cancellation is honoured at the socket level — the returned task throws OperationCanceledException when the token fires.
| url | Full URL to POST to |
| body | Request body bytes |
| contentType | Content-Type header value |
| authorization | Authorization header value (optional) |
| cancellationToken | Cancellation token |
Implemented in HttpClientTransport.