Service of GET POST requests: Getest
With Getest service you can send GET or POST request for testing your application.
URL for tests:
https://vivazzi.pro/test-request/
Depending on the type of request, you will receive appropriate content.
GET
To send a GET request with parameters, use url of the form:
https://vivazzi.pro/test-request/?par_1=foo&par_2=bar
Response:
OK,GET,query_string par_1=foo&par_2=bar
OK - state of response
GET - request type
query_string - list of passed parameters
POST
To send a POST request with parameters, use url of the form:
https://vivazzi.pro/test-request/?par_1=foo&par_2=bar Post data of request: par_3=baz&par_4=muz
Response:
OK,POST,query_string par_1=foo&par_2=bar,body par_3=baz&par_4=muz
OK - state of response
POST - request type
query_string - list of passed parameters in url
body - list of passed parameters in request body
Json response
To send GET or POST request with parameters and receive json-responce, use parameters json=true
in url
.
GET request:
https://vivazzi.pro/test-request/?json=true&par_1=foo&par_2=bar Response: {"status": "OK", "method": "GET", "query_string": "json=true&par_1=foo&par_2=bar"}
POST request:
https://vivazzi.pro/test-request/?json=true&par_1=foo&par_2=bar Post data of request: par_3=baz&par_4=muz Response: {"status": "OK", "method": "POST", "query_string": "json=true&par_1=foo&par_2=bar", "body": "par_3=baz&par_4=muz"}
Usage
Each programming language has own comands for working with urls. For concrete language see apropriate help information.
Below you can see some examples for different languages.
Python
import requests r = requests.get('https://vivazzi.pro/test-request/', data = {'par_1': 'foo', 'par_2': 'bar'}) # r = requests.get('https://vivazzi.pro/test-request/?par_1=foo&par_2=bar') # equivalent print(r.text) # OK,GET,query_string par_1=foo&par_2=bar r = requests.post('https://vivazzi.pro/test-request/', data = {'par_1': 'foo', 'par_2': 'bar'}) print(r.text) # OK,POST,body par_1=foo&par_2=bar
JavaScript
<script src="https://unpkg.com/axios/dist/axios.min.js"></script> axios.get('https://vivazzi.pro/test-request/', {'par_1': 'foo', 'par_2': 'bar'}) .then((response) => { console.log(response.data); // OK,GET,query_string par_1=foo&par_2=bar }) axios.post('https://vivazzi.pro/test-request/', {'par_1': 'foo', 'par_2': 'bar'}) .then((response) => { console.log(response.data); // OK,POST,body par_1=foo&par_2=bar });
Online in browser
Although this service is designed to check the code of your application, the service itself can be checked through the browser:
GET: https://vivazzi.pro/test-request/?par_1=foo&par_2=bar
You will see response: OK,GET,query_string par_1=foo&par_2=bar
Service version: 1.01
Author of service: Artem Maltsev
Changelog
v. 1.01 (21.03.2021)
Added Json response for GET and POST requests.
v. 1.00 (18.02.2021)
Added testing for GET and POST requests.
Comments: 0