Découvrez les effets grâce à nos tutoriels pour débuter avec Skript. Pour toutes vos questions, rendez vous sur le forum ou sur Discord !

Voir les tutos J'ai besoin d'aide

Send Web Request (Envoyer une requête web)

Compatible depuis Reqn 1.0.0

Description

Soumets une requête HTTP à l'URL donnée

  • [%string%] est la méthode HTTP à utiliser. Si non spécifiée, la valeur par défaut sera "get"
  • Les en-têtes doivent être du format "Header-Name: Value".

Exemples # Send a get request to a url. The protocol (http or https) is required.
send a request to "http://example.com"

# Send a request using a different HTTP method.
send a "put" request to "http://example.com"

# Send a request with headers and a body. They are both optional.
send a "post" request to "http://example.com" with the headers "Authorization: Token", and "Content-Type: application/json" and the body "{""body"":""don't forget to escape your quotes!""}"

# They can be in any order, too.
send a "post" request to "http://example.com" with the body "{""body"":""don't forget to escape your quotes!""}" and the headers "Authorization: Token", and "Content-Type: application/json"
Pattern send [a[n]] [http] [%string%] [web] request to [the] [url] %string% [with [the] header[s] %strings% [and [the] body %string%]  send [a[n]] [http] [%string%] [web] request to [the] [url] %string% [with [the] body %string% [and [the] header[s] %strings%]]