Method PostJsonAsync
- Namespace
- IntentSharp.Providers
- Assembly
- IntentSharp.dll
PostJsonAsync(string, object, CancellationToken)
Posts JSON and returns the parsed response document. Maps non-success status codes to typed exceptions and retries transient ones. A success status whose body is not JSON (a proxy's HTML page, for example) throws a transient AIProviderException carrying that status and the parse error as the inner exception; it is not retried.
protected Task<JsonDocument> PostJsonAsync(string relativePath, object body, CancellationToken cancellationToken)
Parameters
relativePathstringbodyobjectcancellationTokenCancellationToken
Returns
- Task<JsonDocument>