I have an azure function .net5 .In this function I use httpclient created by IHttpClientFactory. HttpClient methods like post,put etc. return HttpResponseMessage .I need to return this data from azure function. But the azure function has HttpResponseData as the return type. Bellow you can find a simple code.
[Function("azurefunction")]
public async Task<HttpResponseData> Run([HttpTrigger(AuthorizationLevel.Admin, "post")] HttpRequestData req,
FunctionContext executionContext)
{
HttpResponseMessage response = await httpClient.PostAsync("GetItems", content);
**return response; // here is the issue**
}
Is there any way to do it?