I have a Blob trigger and in that a stream object is there. I want to pass the content/text to a httpclinet post call. How can i do that?
I am having a csv file with 3 lines of data each column is separated by comma
Content in my CSV :
File1,121,12123,5676,fgfg,gfg,fg,
File2,ertet,etert,ert,
File3,354345,345345
[FunctionName("Function1")]
public static void Run([BlobTrigger("expenses/{name}.csv", Connection = "AzureWebJobsStorage")]Stream inputBlob, string name,
[Table("Expenses", Connection = "AzureWebJobsStorage")] IAsyncCollector<Expense> expenseTable,
ILogger log)
{
Here want to convert the stream inputBlob
to string/string builder and want to get the result same as the data which is there in the file.
After that I want to call an (PostAsync call) API with content-type : text/csv and the data mentioned above. I read about httplient. If I am using HttpClient
how do I pass the content-type and the req body