Bienvenue sur le dépôt des projets traités dans les tutoriels du site Nouvelle-Techno.fr
nouvelletechno / api-rest Goto Github PK
View Code? Open in Web Editor NEWLive Coding "Créer une API Rest"
Live Coding "Créer une API Rest"
Bienvenue sur le dépôt des projets traités dans les tutoriels du site Nouvelle-Techno.fr
Merci pour ce superbe tutoriel qui permet de créer un bon service web. C'est d'ailleurs très explicite et bien expliquer.
Je voulais juste revenir sur un point, il me semble que cette api ne respect pas tout à fait les normes REST.
En gros si je pars de cet URL : baseAdrr/api/produit le résultat doit dépendre de la méthode HTTP.
-Si GET -> me renvoie la totalité du contenu
-Si DEL -> supprime la totalité du contenu
-Etc...
Si maintenant je souhaite accéder à un seul élément, il faudra de la même manière utilisé tout le temps la même adresse soit : baseAdrr/api/produit?id=2
Dans ce cas :
-Si GET -> me renvoie le contenu du produit qui a un id de 2
-Si DEL -> supprime la totalité du contenu du produit qui a un id de 2
-Etc...
=> Proposition de solution : Il suffit de tout mettre dans un seul fichier et de tester les méthodes avec un switch-case
Encore merci pour ce code :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.