HttpPlugin.PostAsync(String, String, CancellationToken) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sends an HTTP POST request to the specified URI and returns the response body as a string.
[Microsoft.SemanticKernel.KernelFunction]
public System.Threading.Tasks.Task<string> PostAsync (string uri, string body, System.Threading.CancellationToken cancellationToken = default);
[<Microsoft.SemanticKernel.KernelFunction>]
member this.PostAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<string>
Public Function PostAsync (uri As String, body As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of String)
Parameters
- uri
- String
URI of the request
- body
- String
The body of the request
- cancellationToken
- CancellationToken
The token to use to request cancellation.
Returns
The response body as a string.
- Attributes