« Le système d'exploitation GNU-Linux/cURL » : différence entre les versions

Contenu supprimé Contenu ajouté
 
Ligne 16 :
 
=== POST ===
Le verbe HTTP est précisable avec "-X". Exemple de création de page MediaWiki :
<syntaxhighlight lang=bash>
curl -X POST https://fr.wikibooks.org/w/rest.php/v1/page -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" --data '{"source": "Hello, world!", "title": "User:<my username>/Sandbox", "comment": "Creating a test page with the REST API"}'
curl -X POST "https://fr.wikibooks.org/wiki/Accueil"
</syntaxhighlight>