16
loading...
This website collects cookies to deliver better user experience
//Send Request
GET https://jsonplaceholder.typicode.com/posts
Send Request
link above the request (which will appear if the file's language mode is HTTP), the REST Client will execute the HTTP request and the response from the server will open in the editor.GET
requests a representation of the specified resource. This request should only retrieve data.POST
used to submit an entity to the specified resource.PUT
replaces all current representation of the target resource with the request payload.DELETE
deletes the specified resource.?
and &
, like://Traditional way
GET https://jsonplaceholder.typicode.com/posts?userId=1&id=2
###
//REST Client's way
GET https://jsonplaceholder.typicode.com/posts
?userId=1
&id=2
#
as a delimiter, allows REST Client to recognize multiple requests for in a single file.POST https://jsonplaceholder.typicode.com/posts
content-type: application/json
{
"title": "Ditching Postman for REST Client",
"body": "My 44 year old wife rates this idea very nice :)",
"userId": 777
}
@variableName = variableValue
which occupies a complete line. Keep in mind a variable MUST NOT contain any spaces. As for the variable value, it can contain any characters or whitespaces (leading and trailing whitespaces will be trimmed).DELETE
HTTP request:@baseUrl = https://jsonplaceholder.typicode.com
###
DELETE {{baseUrl}}/posts/50
userId
for a PUT
HTTP request and correct my non-existing wife's age:@baseUrl = https://jsonplaceholder.typicode.com
@userId = 777
###
PUT {{baseUrl}}/posts/100
content-type: application/json
{
"title": "Ditching Postman for REST Client",
"body": "My 24 year old wife rates this idea very nice :)",
"userId": {{userId}}
}