Repository navigation
Add first-class HTTP QUERY registration support - #488
Ken Dale (kendaleiv) wants to merge 1 commit into
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3ca87db4-e33d-49ca-b76d-db9ccb384dbd
89a0b0c to
037c835
Compare
|
Thank you for your contribution. Let me validate these change and have few testing done. Changes looks simple though. |
|
Thanks for this contribution, Ken Dale (@kendaleiv)! I reviewed the change and also traced how a QUERY registration flows through the Node.js worker and the Functions host. OverallThe PR itself looks good to me.
RFC 10008 alignment: suggest documenting the handler's responsibilitiesQUERY is now standardized as RFC 10008. This PR adds registration support, which fits the RFC's intended use (a safe, idempotent request that carries its query in the request body). However, registering with
Potential TypeScript source-compatibility breakAdding const labels: Record<HttpMethod, string> = {
GET: 'GET', POST: 'POST', DELETE: 'DELETE', HEAD: 'HEAD', PATCH: 'PATCH',
PUT: 'PUT', OPTIONS: 'OPTIONS', TRACE: 'TRACE', CONNECT: 'CONNECT',
};
// After this PR: TS2741: Property 'QUERY' is missing in type ... but required in type 'Record<HttpMethod, string>'.An exhaustive This doesn't affect apps that are already running; it surfaces only when a customer upgrades the package and recompiles their TypeScript. Because of that, I don't think this necessarily requires a major version bump. Either way, we should state it clearly in the release notes (and in a tracking issue, if we have one), including the fix: add a Swapnil Nagar (@swapnil-nagar), what do you think? Should we treat this as a minor release with a clear release-note callout, or do you consider widening |
|
Tsuyoshi Ushio (@TsuyoshiUshio) This should be part of 4.17.2. And I do not expect breaking changes. We just need the integration test running daily to ensure there is no regressions. |
Summary
Add
QUERYto the publicHttpMethodtype so TypeScript applications can register QUERY-specific HTTP triggers without type assertions.Introduce
app.queryoverloads following the existing HTTP registration helpers, document usage, and add coverage for registration metadata, public declarations, and request-body preservation.This change addresses library registration support; it does not change host or proxy handling of QUERY requests. Receiving these requests also requires support in the deployed Functions host and any intervening proxies.