I have a very wired issue that I can't figure out if it is a bug in Azure or I am doing something wrong. The following code causing a stackoverflow issue on the return.
[FunctionName("HttpTrigger1")]
public static async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
ILogger log)
{
var array = JObject.FromObject(new {dd=1,ddd=2});
var errorresult = new ObjectResult(array);
return errorresult;
}
No crash occurred everything is going fine on return I receive the following in my terminal.
CollectionDataContractAttribute ByRef)
at System.Runtime.Serialization.DataContract.GetNonDCTypeStableName(System.Type)
at System.Runtime.Serialization.DataContract.GetStableName(System.Type, Boolean ByRef)
at System.Runtime.Serialization.DataContract.GetCollectionStableName(System.Type, System.Type, System.Runtime.Serialization.CollectionDataContractAttribute ByRef)
at System.Runtime.Serialization.DataContract.GetNonDCTypeStableName(System.Type)
at System.Runtime.Serialization.DataContract.GetStableName(System.Type, Boolean ByRef)
at System.Runtime.Serialization.DataContract.GetCollectionStableName(System.Type, System.Type, System.Runtime.Serialization.CollectionDataContractAttribute ByRef)
at System.Runtime.Serialization.DataContract.GetNonDCTypeStableName(System.Type)
at System.Runtime.Serialization.DataContract.GetStableName(System.Type, Boolean ByRef)
at System.Runtime.Serialization.DataContract.GetCollectionStableName(System.Type, System.Type, System.Runtime.Serialization.CollectionDataContractAttribute ByRef)
at System.Runtime.Serialization.DataContract.GetNonDCTypeStableName(System.Type)
at System.Runtime.Serialization.DataContract.GetStableName(System.Type, Boolean ByRef)
at System.Runtime.Serialization.DataContract.GetCollectionStableName(System.Type, System.Type, System.Runtime.Serialization.CollectionDataContractAttribute ByRef)
at System.Runtime.Serialization.DataContract.GetNonDCTypeStableName(System.Type)
at System.Runtime.Serialization.DataContract.GetStableName(System.Type, Boolean ByRef)
at System.Runtime.Serialization.DataContract.GetCollectionStableName(System.Type, System.Type, System.Runtime.Serialization.CollectionDataContractAttribute ByRef)
at System.Runtime.Serialization.DataContract.GetNonDCTypeStableName(System.Type)
at System.Runtime.Serialization.DataContract.GetStableName(System.Type, Boolean ByRef)
at System.Runtime.Serialization.DataContract.GetCollectionStableName(System.Type, System.Type, System.Runtime.Serialization.CollectionDataContractAttribute ByRef)
at System.Runtime.Serialization.DataContract.GetNonDCTypeStableName(System.Type)
at System.Runtime.Serialization.DataContract.GetStableName(System.Type, Boolean ByRef)
at System.Runtime.Serialization.DataContract.GetCollectionStableName(System.Type, System.Type, System.Runtime.Serialization.CollectionDataContractAttribute ByRef)
at System.Runtime.Serialization.DataContract.GetNonDCTypeStableName(System.Type)
at System.Runtime.Serialization.DataContract.GetStableName(System.Type, Boolean ByRef)
----- Repeated over and over :(
One important detail This happen when I add The Accept header, in postman, -->application/vnd.api+json If I removed the Accept header everything will work properly.
I tried using application/json in postman it works properly with your code and it's not working with application/vnd.api+json.
In Visual Studio, I have created a FunctionApp with HttpTrigger and replaced with the following code you given.
[FunctionName("HttpTrigger1")]
public static async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
ILogger log)
{
var array = JObject.FromObject(new {dd=1,ddd=2});
var errorresult = new ObjectResult(array);
return errorresult;
}
Then I have reproduced with your code as below:
using System;
using System.IO;
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 Newtonsoft.Json.Linq;
namespace FunctionAppfun
{
public static class Function1
{
[FunctionName("HttpTrigger1")]
public static async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
ILogger log)
{
var array = JObject.FromObject(new { dd = 1, ddd = 2 });
var errorresult = new ObjectResult(array);
return errorresult;
}
}
}
and I Have received error as you have.
Then, With below code and application/vnd.api+json it worked perfectly for me:
using System;
using System.IO;
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;
namespace FunctionAppfun
{
public static class Function1
{
[FunctionName("Function1")]
public static async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
ILogger log)
{
log.LogInformation("C# HTTP trigger function processed a request.");
string name = req.Query["name"];
string requestBody = await new StreamReader(req.Body).ReadToEndAsync();
dynamic data = JsonConvert.DeserializeObject(requestBody);
name = name ?? data?.name;
string responseMessage = string.IsNullOrEmpty(name)
? "This HTTP triggered function executed successfully. Pass a name in the query string or in the request body for a personalized response."
: $"Hello, {name}. This HTTP triggered function executed successfully.";
return new OkObjectResult(responseMessage);
}
}
}
Related
I have an azure webjobs function and I need to get either an array or string back. The function definition is as follows.
[FunctionName("GetFilteredEorInstancesByStatusOrganisationId")]
[OpenApiOperation(operationId: "GetFilteredEorInstancesStatusByOrganisationId", tags: new[] { "reads" })]
[OpenApiSecurity("function_key", SecuritySchemeType.ApiKey, Name = "code", In = OpenApiSecurityLocationType.Query)]
[OpenApiParameter(name: "organisationId", In = ParameterLocation.Path, Required = true, Type = typeof(string), Description = "the id of the Organisation")]
[OpenApiParameter(name: "searchFilter", In = ParameterLocation.Path, Required = true, Type = typeof(string), Description = "the search text filter")]
[OpenApiParameter(name: "status", In = ParameterLocation.Path, Required = true, Type = typeof(string), Description = "the status text filter")]
[OpenApiResponseWithBody(statusCode: HttpStatusCode.OK, contentType: "text/json", bodyType: typeof(JObject), Description = "OK response")]
[OpenApiResponseWithBody(statusCode: HttpStatusCode.NotFound, contentType: "text/plain", bodyType: typeof(string), Description = "NOT FOUND response")]
public async Task<IActionResult> GetFilteredEorInstancesByStatusOrganisationId(
[HttpTrigger(AuthorizationLevel.Function, "get", Route = "organisations/{organisationId}/eorinstances/filters/{searchFilter}/statuses/{status}")]
HttpRequest req, string organisationId, string searchFilter, [FromUri(Name ="status")] List<string> status)
I use the get request "http://localhost:7071/api/organisations/xxx/eorinstances/filters/xxx/statuses/status[0]=xxx". I have tried using FromQuery and FromRoute along with a multitude of get requests I have seen online. Does anyone know a working way to do this with routing on azure functions?
To fetch the route as a string, I have followed the below approach.
Below is the code to fetch the route as a string.
using System.Net;
using Azure;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Azure.Functions.Worker;
using Microsoft.Azure.Functions.Worker.Http;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
namespace FunctionApp14
{
public class Function1
{
private readonly ILogger _logger;
public Function1(ILoggerFactory loggerFactory)
{
_logger = loggerFactory.CreateLogger<Function1>();
}
[Function("Function1")]
public HttpResponseData Run([HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = "{param1}/{param2}")] HttpRequestData req,
string param1, string param2)
{
_logger.LogInformation("C# HTTP trigger function processed a request.");
_logger.LogInformation($"param1: {param1}");
_logger.LogInformation($"param2: {param2}");
var response = req.CreateResponse(HttpStatusCode.OK);
response.Headers.Add("Content-Type", "text/plain; charset=utf-8");
response.WriteString("Welcome to Azure Functions!");
return response;
}
}
}
I have added the telemetry in Http trigger function by adding package Microsoft.ApplicationInsights" Version="2.17.0" to view the logs in application insight.
private readonly TelemetryClient _telemetry;
public GoogleAuth(ShoppingContentService service, int maxListPageSize,TelemetryConfiguration telemetryConfiguration)
{
this.service = service;
this.maxListPageSize = maxListPageSize;
this._telemetry = new TelemetryClient(telemetryConfiguration);
}
and I am using this telemetry inside my http trigger function .
_telemetry.TrackTrace($"[GoogleProductData]: Request body:{data}");
But I am getting this error.
An unhandled host error has occurred.
[2021-06-17T13:08:55.752Z] Microsoft.Extensions.DependencyInjection.Abstractions: Unable to resolve service for type 'Google.Apis.ShoppingContent.v2_1.ShoppingContentService' while attempting to activate 'ShoppingSamples.Content.GoogleAuth'.
Pls follow this tutorial and using Microsoft.Azure.WebJobs.Logging.ApplicationInsights instead. This is recommended by official document. This is my testing code( just create a new http trigger function in visual studio)
using System;
using System.IO;
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 Microsoft.ApplicationInsights;
using Microsoft.ApplicationInsights.Extensibility;
namespace FunctionApp1
{
public class Function1
{
private readonly TelemetryClient telemetryClient;
/// Using dependency injection will guarantee that you use the same configuration for telemetry collected automatically and manually.
public Function1(TelemetryConfiguration telemetryConfiguration)
{
this.telemetryClient = new TelemetryClient(telemetryConfiguration);
}
[FunctionName("Function1")]
public async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)] HttpRequest req,
ILogger log)
{
log.LogInformation("C# HTTP trigger function processed a request.");
string name = req.Query["name"];
string requestBody = await new StreamReader(req.Body).ReadToEndAsync();
dynamic data = JsonConvert.DeserializeObject(requestBody);
name = name ?? data?.name;
string responseMessage = string.IsNullOrEmpty(name)
? "This HTTP triggered function executed successfully. Pass a name in the query string or in the request body for a personalized response."
: $"Hello, {name}. This HTTP triggered function executed successfully.";
return new OkObjectResult(responseMessage);
}
}
}
and adding APPINSIGHTS_INSTRUMENTATIONKEY to local.settings.json
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"FUNCTIONS_WORKER_RUNTIME": "dotnet",
"APPINSIGHTS_INSTRUMENTATIONKEY": "instrument_key_here"
}
}
I have an Azure function that get an HTTP request , this azure function call a Stored Procedure who update the database,
The Stored Procedure works well and update the table in DB.
But when i ant to simulate this request with postMan i had error(500 :Internal Serveur Erro).
Here is my Function Azure:
using System.IO;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Azure.WebJobs;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using System;
using Core.Handlers;
using System.Text.Json;
using Newtonsoft.Json.Linq;
namespace RealTimeTriggerFunctions
{
public static class SendToAzureSql
{
private static readonly string AZURE_TABLE1=
Environment.GetEnvironmentVariable("AZURE_TABLE1");
// Handler
private static AzureSqlHandler azSqlHandler;
[FunctionName("SendToAzureSql")]
public static async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
ILogger log)
{
string procedureName = "";
try
{
string requestBody = await new StreamReader(req.Body).ReadToEndAsync();
if(string.IsNullOrEmpty(requestBody))
{
return new BadRequestResult();
}
dynamic message = JsonConvert.DeserializeObject(requestBody);
if (message == null)
{
return new BadRequestResult();
}
log.LogInformation((string)message.type.ToString()+ " progress...");
switch (message.type.ToString())
{
case "xx.yy.zz.event.table1.table1":
procedureName = "stored_table1";
InitHandlers(log, AZURE_TABLE1);
break;
default:
return new BadRequestObjectResult("Wrong Request!");
}
var dataJson = JsonDocument.Parse(requestBody);
string actionType = message.type.ToString().Contains("deleted") ? "Deleted": "Default";
await azSqlHandler.UpsertItemAsync(procedureName, actionType, payload:
dataJson.RootElement);
return new OkObjectResult(message.type.ToString() + " Processed");
}
catch (Exception e)
{
log.LogError($"An error occurred while processing request : '{e.Message}'");
throw e;
}
}
/// <summary>
/// Init connexions
/// </summary>
private static void InitHandlers(ILogger log, string connectionString)
{
// Create handler
azSqlHandler = new AzureSqlHandler(log, connectionString);
}
}
}
I call this request in POST : http://localhost:7071/API/SendToAzureSql I get 500.
I found my answer here:
Fetching access token for keyvault
i run az- login in my Azure cli and it Works
I am trying to inject IHttpClientFactory service on Azure Function v3, but I keep getting the following erorr saying resolving a service failed.
I use azure-functions-core-tools#v3 to run Azure Function locally.
[2/14/2020 5:45:19 PM] Executed 'Foo' (Failed, Id=24489b3b-af99-417e-b175-443b76c241d5)
[2/14/2020 5:45:19 PM] Microsoft.Extensions.DependencyInjection.Abstractions: Unable to resolve service for type 'System.Net.Http.IHttpClientFactory' while attempting to activate 'MyFunction.Function.Foo'.
I have a startup class that is supposed to inject a service for IHttpClientFactory.
using Microsoft.Azure.Functions.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection;
namespace MyFunction
{
public class Startup : FunctionsStartup
{
public override void Configure(IFunctionsHostBuilder builder)
{
builder.Services.AddHttpClient();
}
}
}
And below is an azure function class that uses injected service of IHttpClientFactory to create a HTTP client and send a GET request to a server.
using System.Threading.Tasks;
using System.Net.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Extensions.Http;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
namespace MyFunction.Function
{
public class Foo
{
private readonly HttpClient httpClient;
public Scrape(IHttpClientFactory httpClientFactory)
{
httpClient = httpClientFactory.CreateClient();
}
[FunctionName("Foo")]
public async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)] HttpRequest req,
ILogger log)
{
var result = await httpClient.GetAsync("https://google.com");
var data = await result.Content.ReadAsStringAsync();
return new OkObjectResult(data);
}
}
}
Am I missing something?
It looks like your startup.cs class is missing it's assembly reference?
[assembly: FunctionsStartup(typeof(MyFunction.Startup))]
Try adding that to the startup class. Add it just after your using statements at the top, and before any namespace declaration.
Also, most examples I have seen show the client actually created during function execution, not in the default constructor.
using System.Threading.Tasks;
using System.Net.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Extensions.Http;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
namespace MyFunction.Function
{
public class Foo
{
private readonly HttpClient httpClient;
public Scrape(IHttpClientFactory httpClientFactory)
{
factory = httpClientFactory;
}
[FunctionName("Foo")]
public async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)] HttpRequest req,
ILogger log)
{
HttpClient httpClient = factory.CreateClient();
var result = await httpClient.GetAsync("https://google.com");
var data = await result.Content.ReadAsStringAsync();
return new OkObjectResult(data);
}
}
}
Is it possible to (input) bind to table storage within an http-triggered function?
I'm attempting to add an input-binding to table-storage inside of a regular http-triggered function with the following attribute:
[Table("MyTable", "MyPartition", "{httpTrigger}")] MyPoco poco
However it's returning the following error when I execute it:
[6/5/2019 5:36:38 PM] An unhandled host error has occurred. [6/5/2019
5:36:38 PM] Microsoft.Azure.WebJobs.Host:
'tableStorageInputBindingHttpTriggered' can't be invoked from Azure
WebJobs SDK. Is it missing Azure WebJobs SDK attributes?.
Additionally at startup, I get this exception:
[6/5/2019 6:17:17 PM] tableStorageInputBindingHttpTriggered: Microsoft.Azure.WebJobs.Host: Error indexing method 'tableStorageInputBindingHttpTriggered'. Microsoft.Azure.WebJobs.Host: Unable to resolve binding parameter 'httpTrigger'. Binding expressions must map to either a value provided by the trigger or a property of the value the trigger is bound to, or must be a system binding expression (e.g. sys.randguid, sys.utcnow, etc.).
Here's the full function:
public class MyPoco
{
public string PartitionKey { get; set; }
public string RowKey { get; set; }
public string Directory { get; set; }
}
public static class tableStorageInputBindingHttpTriggered
{
[FunctionName("tableStorageInputBindingHttpTriggered")]
public static async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)] HttpRequest req,
[Table("MyTable", "MyPartition", "{httpTrigger}")] MyPoco poco,
ILogger log)
{
string name = req.Query["name"];
string requestBody = await new StreamReader(req.Body).ReadToEndAsync();
dynamic data = JsonConvert.DeserializeObject(requestBody);
name = name ?? data?.name;
return name != null
? (ActionResult)new OkObjectResult($"PK={poco.PartitionKey}, RK={poco.RowKey}, Text={poco.Directory}")
: new BadRequestObjectResult("");
}
}
What am I doing wrong? How do I bind to table storage within an http-triggered azure-function?
Issue is that http trigger returns you an object so it dont know how to extract your key.
You need to use route, which will tell Function how to get parameter and then you will be able to use that parameters
public static async Task<HttpResponseMessage> SetLatestAsync(
[HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = "release-set-latest/{program}")]
HttpRequestMessage req,
string program,
[Table(TableName, "latest", "{program}")]FlymarkLatestVersion pocos)
This inserts the request body to Table storage by binding to CloudTable
using System;
using System.IO;
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 Microsoft.WindowsAzure.Storage.Table;
namespace AzureFunctionsSandbox
{
public class MyPoco : TableEntity
{
public string Body { get; set; }
}
public static class Function1
{
[FunctionName("Function1")]
public static async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)] HttpRequest req,
[Table("Sandbox", "StorageConnectionString")] CloudTable table,
ILogger log)
{
log.LogInformation("C# HTTP trigger function processed a request.");
string requestBody = await new StreamReader(req.Body).ReadToEndAsync();
var poco = new MyPoco { PartitionKey = "HttpTrigger", RowKey = Guid.NewGuid().ToString(), Body = requestBody };
var insertOperation = TableOperation.Insert(poco);
await table.ExecuteAsync(insertOperation);
return new OkObjectResult($"PK={poco.PartitionKey}, RK={poco.RowKey}, Text={poco.Body}");
}
}
}
Note: MyPoco inherits from TableEntity which allows you to create the TableOperation.Insert(poco) as .Insert() takes an ITableEntity.
local.settings.json
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"FUNCTIONS_WORKER_RUNTIME": "dotnet",
"StorageConnectionString": "UseDevelopmentStorage=true"
}
}
Seems you are trying to read your Azure Table Storage from HTTP Trigger Function. Please have a look on the code snippet below:
Your POCO Class:
public class MyPoco
{
public string PartitionKey { get; set; }
public string RowKey { get; set; }
public string Directory { get; set; }
}
Table Storage Class:
public class TableStorageClass
{
public TableStorageClass()
{
}
public TableStorageClass(DynamicTableEntity entity)
{
PartitionKey = entity.PartitionKey;
RowKey = entity.RowKey;
}
public string PartitionKey { get; set; }
public string RowKey { get; set; }
}
Azure HTTP Trigger Function V2:
public static class FunctionReadFromTableStorage
{
[FunctionName("FunctionReadFromTableStorage")]
public static async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
ILogger log)
{
log.LogInformation("C# HTTP trigger function processed a request.");
//Read Request Body
var content = await new StreamReader(req.Body).ReadToEndAsync();
//Extract Request Body and Parse To Class
MyPoco objMyPoco = JsonConvert.DeserializeObject<MyPoco>(content);
// Validate param because PartitionKey and RowKey is required to read from Table storage In this case , so I am checking here.
dynamic validationMessage;
if (string.IsNullOrEmpty(objMyPoco.PartitionKey))
{
validationMessage = new OkObjectResult("PartitionKey is required!");
return (IActionResult)validationMessage;
}
if (string.IsNullOrEmpty(objMyPoco.RowKey))
{
validationMessage = new OkObjectResult("RowKey is required!");
return (IActionResult)validationMessage;
}
// Table Storage operation with credentials
var client = new CloudTableClient(new Uri("https://YourStorageURL.table.core.windows.net/"),
new Microsoft.WindowsAzure.Storage.Auth.StorageCredentials("YourStorageName", "xtaguZokAWbfYG4QDkBjT+YourStorageKey+T/kId/Ng+cl3TfYHtg=="));
var table = client.GetTableReference("YourTableName");
//Query filter
var query = new TableQuery()
{
FilterString = string.Format("PartitionKey eq '{0}' and RowKey eq '{1}'", objMyPoco.PartitionKey, objMyPoco.RowKey)
};
//Request for storage query with query filter
var continuationToken = new TableContinuationToken();
var storageTableQueryResults = new List<TableStorageClass>();
foreach (var entity in table.ExecuteQuerySegmentedAsync(query, continuationToken).GetAwaiter().GetResult().Results)
{
var request = new TableStorageClass(entity);
storageTableQueryResults.Add(request);
}
//As we have to return IAction Type So converting to IAction Class Using OkObjectResult We Even Can Use OkResult
var result = new OkObjectResult(storageTableQueryResults);
return (IActionResult)result;
}
}
Point To Remember:
In case of Azure Portal execution just get rid of FunctionReadFromTableStorage class
You need following reference to execute above code
using System;
using System.IO;
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 Microsoft.WindowsAzure.Storage.Table;
using System.Collections.Generic;
Postman Request Pattern:
Function Invoke Sample:
{
"PartitionKey": "Your Param According to Table Storage Design" ,
"RowKey": "Your Param According to Table Storage Design",
"Directory": "Your Param According to Table Storage Design"
}
See the screenshot:
Postman response:
Response is subject to my own table design
[
{
"partitionKey": "Microsoft SharePoint Server",
"rowKey": "2016"
}
]
See the screenshot below:
Note: I like to write code in simple and readable way. I just tried it for your case. If it resolved your issue my effort would be success then. This is the easiest way I know so far to read from
Azure table storage.