simple.httphttp
### LOGIN_REQUEST
POST https://echo.kulala.app/post HTTP/1.1
Content-Type: application/json
{
"username": "user123",
"password": "pass123",
"withsecrets_env_test": "{{ $env.API_BEARER_TOKEN }}",
"OS_USER": "{{ $env.USER }}"
}
### REQUEST_WITH_QUERY_PARAMS_AND_HEADERS_AND_COMMENTS_AND_OPERATORS
# @kulala-curl--insecure
# @kulala-curl--connect-timeout 5
# @kulala-curl--max-time 5
POST https://echo.kulala.app/post
?someKey=someValue1
# &someKey2=someValue2
&someKey3=someValue3
# &someKey4=someValue4
&someKey5=someValue5
# &someKey6=someValue6
&someKey7=someValue7 HTTP/1.1
# X-My-Custom-Header1: MyValue1
# X-My-Custom-Header4: MyValue4
# X-My-Custom-Header6: MyValue6
Content-Type: application/json
X-My-Custom-Header2: MyValue2
X-My-Custom-Header5: MyValue5
X-My-Custom-Header7: MyValue7
{
"username": "user123",
"password": "pass123"
}
### COOKIE_REQUEST
POST https://echo.kulala.app/post HTTP/1.1
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Cookie: _ga=GA1.2.1903065019.1615319519
Cookie: NAME2=VALUE2
{
"date": "2023-05-10",
"temperatureC": 30,
"summary": "Warm"
}
### GRAPHQL_REQUEST
GRAPHQL https://echo.kulala.app/post HTTP/1.1
{
"username": "user123",
"password": "pass123"
}
### NAMED_SIMPLE
POST https://echo.kulala.app/post HTTP/1.1
X-Custom-Header: Kulala-Named-Request
{
"message": "Hello, Kulala!"
}
### NAMED_REQUEST
GET https://echo.kulala.app/get HTTP/1.1
X-Custom-Header: Kulala-Named-Request
### NAMED_REQUEST_INSECURE
< {%
var fs = require('fs');
if (!fs.existsSync('TOKEN.txt')) {
console.log('TOKEN.txt not found, requiring new token');
} else {
console.log('TOKEN.txt found, using token from file');
}
%}
# @kulala-curl--insecure
POST https://echo.kulala.app/post HTTP/1.1
Content-Type: application/json
X-Custom-Header: Kulala-Insecure
{
"token": "some-insecure-token"
}
> ./simple.post.http.js
> {%
const fs = require('fs');
fs.writeFileSync('TOKEN.txt', response.body.json.token);
%}