Posted to tcl by oldlaptop at Sat Oct 08 15:56:48 GMT 2022view pretty

$ ./postplayground --server 8080 & # https://github.com/oldlaptop/postplayground/blob/master/postplayground
$ Listening for HTTP requests on TCP port 8080

$ curl --data '{"name": "Name", "id": 1}' http://localhost:8080
2022-08-10T11:54:21: POST / from 127.0.0.1:42322 (curl/7.84.0)
content (25 octets of application/x-www-form-urlencoded):
{"name": "Name", "id": 1}

$ curl --json '{"name": "Name", "id": 1}' http://localhost:8080
2022-08-10T11:54:28: POST / from 127.0.0.1:34654 (curl/7.84.0)
content (25 octets of application/json):
{"name": "Name", "id": 1}

$ eltclsh

                        eltclsh1.18 - Copyright (C) 2001-2020 LAAS-CNRS

eltclsh > exec curl --data {{"name": "Name", "id": 1}} http://localhost:8080
2022-08-10T11:54:54: POST / from 127.0.0.1:55504 (curl/7.84.0)
content (25 octets of application/x-www-form-urlencoded):
{"name": "Name", "id": 1}

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100    25    0     0  100    25      0  28669 --:--:-- --:--:-- --:--:-- 25000
eltclsh > exec curl --json {{"name": "Name", "id": 1}} http://localhost:8080
2022-08-10T11:55:01: POST / from 127.0.0.1:55514 (curl/7.84.0)
content (25 octets of application/json):
{"name": "Name", "id": 1}

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100    25    0     0  100    25      0  28571 --:--:-- --:--:-- --:--:-- 25000
eltclsh >