title: how can we use await blob.UploadAsync(data, blobHttpHeader); to accept a json request
body: <p>I have been trying to send a json data through http trigger function using c# code to store this data into azure blob storage.</p>
  <p>For ex:</p>
  <p>{&quot;name1&quot;:&quot;Chandra&quot;} is the data i want to push it as an object entry into azure blob using a Http trigger function. And below is the code i have written to push the JSON request object into the azure blob:</p>
  <pre><code>    using System;
  using System.IO;
  using Azure.Storage.Blobs;
  using Azure.Storage.Blobs.Specialized;
  using System.Threading.Tasks;
  using Microsoft.AspNetCore.Mvc;
  using Microsoft.Azure.WebJobs;
  using Microsoft.Azure.WebJobs.Extensions.Http;
  using Microsoft.AspNetCore.Http;
  using Microsoft.Extensions.Logging;
  using Newtonsoft.Json;
  using System.Text;
  using Azure.Storage.Blobs.Models;
  
  namespace fileuploadfunc
  {
      public static class FileUpload
      {
          [FunctionName(&quot;FileUpload&quot;)]
          public static async Task&lt;IActionResult&gt; Run(
              [HttpTrigger(AuthorizationLevel.Function, &quot;get&quot;, &quot;post&quot;, Route = null)] HttpRequest req,
              ILogger log)
          {
              log.LogInformation(&quot;File Upload script loading started&quot;);
              string Connection = Environment.GetEnvironmentVariable(&quot;AzureWebJobsStorage&quot;);
              string containerName = Environment.GetEnvironmentVariable(&quot;ContainerName&quot;);
  
  
  
              var blobClient = new BlobContainerClient(Connection, containerName);
  
  
              string requestBody = await new StreamReader(req.Body).ReadToEndAsync();
              dynamic data = JsonConvert.DeserializeObject(requestBody);
  
              log.LogInformation(&quot;requestbody&quot;,requestBody);
              //Stream myBlob = data;
              //var file = req.Form.Files[&quot;File&quot;];
              int i = +1;
              var random = i;
  
  
              // var blobClient1 = new SpecializedBlobClientOptions();
              // var blob = blobClient.GetBlobClient(file.FileName);
              var blobHttpHeader = new BlobHttpHeaders();
              blobHttpHeader.ContentType = &quot;application/json&quot;;
  
        
  
                  var blob = blobClient.GetBlobClient(&quot;events1&quot;);
              var uploadedBlob = await blob.UploadAsync(data, blobHttpHeader);
              //await blobClient.UploadBlobAsync(&quot;event_json&quot;,data,cancellationToken:data);
              //blob.Upload(myBlob);
  
              // blob.Upload(json);
  
              return new OkObjectResult(&quot;file uploaded successfully&quot;);
         
          }
      }
  }
  </code></pre>
  <p>This code is not working as i expected
  could you please help me with your suggestions on what should be added in the code in-order to accept json type of request and push it as a object into azure blob.</p>