Skip to content

Add Azure Functions Isolated Worker Model Support (HttpRequestData) #10

Description

@lqdev

Summary

The current \WebmentionReceiverService\ and \RequestValidationService\ accept \Microsoft.AspNetCore.Http.HttpRequest\ for processing webmention requests. This works well with Azure Functions in-process model and ASP.NET Core applications.

However, with the migration to Azure Functions Isolated Worker Model (required for .NET 8+ and .NET 10), HTTP triggers receive \HttpRequestData\ from \Microsoft.Azure.Functions.Worker.Http\ instead of \HttpRequest.

Proposal

Add overloads or adapters to support \HttpRequestData:

Option 1: Add overloads

\\ sharp
// Existing
member _.ValidateAsync (req: HttpRequest) = ...

// New overload
member _.ValidateAsync (req: HttpRequestData) = ...
\\

Option 2: Accept form data directly

\\ sharp
// More generic approach - works with any HTTP abstraction
member _.ValidateAsync (source: string) (target: string) = ...
// or
member _.ValidateAsync (formData: UrlData) = ...
\\

Context

This came up while upgrading WebmentionService from .NET 6 (in-process) to .NET 10 (isolated worker model).

Workaround

In the meantime, consumers can manually extract source/target from \HttpRequestData\ and create \UrlData\ directly, bypassing the form parsing in the library.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions