Liste des types MIME communs - HTTP | MDN
▻https://developer.mozilla.org/fr/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types
Liste des types MIME communs - HTTP | MDN
▻https://developer.mozilla.org/fr/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types
Introduction – SVG 1.1 (Second Edition)
▻https://www.w3.org/TR/SVG/intro.html#MIMEType
mime-type pour les SVG et autres spécifications
et un outil pour tester l’en-tête envoyé par un serveur : ▻http://planetsvg.com/tools/mime.php
The lie of the API | Ruben Verborgh
▻http://ruben.verborgh.org/blog/2013/11/29/the-lie-of-the-api
Futuristic? It’s not: it works already, and it’s really simple. Here is a designer chair from the Cooper-Hewitt museum:
▻http://collection.cooperhewitt.org/objects/35460799
The cool thing is that machine clients use the same URL to access a JSON version:
curl ▻http://collection.cooperhewitt.org/objects/35460799 -H “Accept: text/html”
curl ▻http://collection.cooperhewitt.org/objects/35460799 -H “Accept: application/json”
Not only does this enable to share URLs between different parties, it also makes access really simple. I don’t have to read the manual. Instead, I just use the same interface I use every day: the URL. Works the same way everywhere.
This technique is called content negotiation and it is a characteristic of REST APIs.
Voui voui voui. Chouette article qui met la pile aux gens qui compliquent à loisir.
#API #REST #content-negotiation #mime-type #HTTP #URL
Mais souvent pour faciliter les clients, c’est plus facile de leur faire passer des paramètres en get ou post que de leur demander de savoir gérer les entêtes HTTP. Enfin j’avais l’impression. (Moi-même étant assez nul en connaissance d’entêtes HTTP au passage.)
URLs identify concepts, and each URL can have multiple representations. This means that a single resource can be identified with one URL for all clients . Each client just indicates to the server whether it wants HTML or JSON or something else, and the server replies with a representation the client understands.
This lack of knowledge comes from developers being all too familiar with the programming-oriented environment they usually work with, but mostly oblivious about the resource-oriented nature of the Web.
The Web is an information space , not a programming space.
I imagine that developers were approached with the question “can you build an API?” And this is what they did.
But the question was wrong. It should have been: “ can you add machine access ?”