Git Product home page Git Product logo

api-rest's Introduction

Nouvelle-Techno.fr

Banner

LinkedIn Account Website Discord Account Facebook Account Youtube Account

Bienvenue sur le dépôt des projets traités dans les tutoriels du site Nouvelle-Techno.fr

Projets

Readme Card Readme Card

Readme Card Readme Card

Readme Card Readme Card

Stats

Stats Top Langs

Divers

Buy Me a Coffee

api-rest's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

api-rest's Issues

Concept d'API rest

Merci pour ce superbe tutoriel qui permet de créer un bon service web. C'est d'ailleurs très explicite et bien expliquer.

image

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 :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.