/// <inheritdoc /> public Task <HttpResponseMessage> DeleteAsync(string path, IRequestSpan parentSpan, IRequestSpan encodeSpan, CancellationToken token) { var requestUri = GetUri(path); parentSpan.WithRemoteAddress(requestUri); encodeSpan.Dispose(); using var dispatchSpan = parentSpan.DispatchSpan(); return(HttpClient.DeleteAsync(requestUri, token)); }
/// <inheritdoc /> public Task <HttpResponseMessage> PostAsync(string path, IRequestSpan parentSpan, IRequestSpan encodeSpan, CancellationToken token, EventingFunction eventingFunction = null) { var requestUri = GetUri(path); parentSpan.WithRemoteAddress(requestUri); var content = eventingFunction != null ? new StringContent(eventingFunction.ToJson()) : new StringContent(string.Empty); encodeSpan.Dispose(); using var dispatchSpan = parentSpan.DispatchSpan(); return(HttpClient.PostAsync(requestUri, content, token)); }