ParallelModelClient.DeleteAsync method
Sends an authenticated HTTP DELETE request to the Core API with an optional JSON payload.
public Task<ParallelModelResponse> DeleteAsync(string endpoint, object? jsonPayload = null,
IReadOnlyDictionary<string, string?>? query = null,
IReadOnlyDictionary<string, string>? headers = null, TimeSpan? timeout = default,
CancellationToken cancellationToken = default)
| parameter | description |
|---|---|
| endpoint | The relative endpoint path within the target API. |
| jsonPayload | The optional request payload to serialize as JSON. |
| query | Optional query parameters to append to the request URI. |
| headers | Optional request headers. Authorization and X-ParallelModel-Region are managed by the client. |
| timeout | The optional request timeout; when omitted, the configured timeout is used. |
| cancellationToken | The cancellation token used to cancel the operation. |
Return Value
A task that represents the asynchronous operation and returns the API response, including its status code, parsed JSON when available, raw text and headers.
Exceptions
| exception | condition |
|---|---|
| ParallelModelConfigurationException | The endpoint is not a safe relative API path. |
| ParallelModelTransportException | The HTTP transport fails or the response body cannot be read. |
| ParallelModelResponseDecodeException | The API returns malformed JSON with a JSON content type. |
See Also
- record ParallelModelResponse
- class ParallelModelClient
- namespace ParallelModel.Sdk