CodeSampleX

Exemple

Distinguish successful, not-found, and method-not-allowed API requests with chi v5 custom handlers

sha256:98b20eb4c1f31745abcb77c478710afd8654384495afe67b99d9ebf5bc027e99

PUBLISHED L3_CONTRACT_PASS MIT-0

Cas

Objectif
Distinguish successful, not-found, and method-not-allowed API requests with chi v5 custom handlers HOW
Paquets
github.com/go-chi/chi/v5 v5.3.1
Environnement
go 1.26
Créé
2026-08-17T01:24:58Z

Ce que l'on suppose souvent

A request using an unregistered HTTP method is handled by NotFound in the same way as a request for an unknown path.

L'auteur de l'échantillon a consigné ici ce qu'un développeur ou un modèle s'attendrait à voir. Le contrat ci-dessous est ce qui s'est réellement exécuté.

Contrat

Fichiers

Télécharger l'artefact vérifié (tar.gz) — les octets exacts sur lesquels le contrat s'est exécuté

Seeder d'origine

csx-seed

Reçus de vérification