Kodice.Azure.Functions.Http
1.0.2
Prefix Reserved
dotnet add package Kodice.Azure.Functions.Http --version 1.0.2
NuGet\Install-Package Kodice.Azure.Functions.Http -Version 1.0.2
<PackageReference Include="Kodice.Azure.Functions.Http" Version="1.0.2" />
paket add Kodice.Azure.Functions.Http --version 1.0.2
#r "nuget: Kodice.Azure.Functions.Http, 1.0.2"
// Install Kodice.Azure.Functions.Http as a Cake Addin #addin nuget:?package=Kodice.Azure.Functions.Http&version=1.0.2 // Install Kodice.Azure.Functions.Http as a Cake Tool #tool nuget:?package=Kodice.Azure.Functions.Http&version=1.0.2
Kodice.Azure.Functions.Http
Kodice.Azure.Functions.Http has been designed to promote the reuse of common and repetitive code required for handle HttpResponseData and HttpRequestData.
About the Project
As an example, if we want to use a new API with Azure Function Isolated .NET 8 and fetch form-data parameters and files, or want to quickly create Json or Image responses.
- Parse Request form-data with files and parameters key/value
- Create response types
Getting Started
Installing Kodice.Azure.Functions.Http
dotnet add package Kodice.Azure.Functions.Http
Project status
Environment | Status |
---|---|
Development |
Usage
Azure Functions V4
A .NET project for Azure Functions using the isolated worker model is basically a .NET console app project that targets a supported .NET runtime.
A simple example on how to add the Kodice.RapidAPI to your API project.
[Function(nameof(Create))]
public HttpResponseData Create([HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = "v1/create")] HttpRequestData req)
{
_logger.LogInformation("Request profile.");
var response = req.CreateResponse();
// Parse form-data
FormData data = req.Body.ToFormData();
// Parameters file
var fileProfile = data.Files.File("KEYFILE");
// Create bad request
// Other responses can be created (JSON, Text, Image..)
if (fileProfile == null)
return response.CreateBadRequest("Image missing or empty.");
// Parameter values
string value = data.Values["KEYNAME];
}
Dependencies
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- HttpMultipartParser (>= 8.2.0)
- Microsoft.Azure.Functions.Worker.Core (>= 1.16.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.2 | 199 | 1/6/2024 |