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

  1. $ ./postplayground --server 8080 & # https://github.com/oldlaptop/postplayground/blob/master/postplayground
  2. $ Listening for HTTP requests on TCP port 8080
  3.  
  4. $ curl --data '{"name": "Name", "id": 1}' http://localhost:8080
  5. 2022-08-10T11:54:21: POST / from 127.0.0.1:42322 (curl/7.84.0)
  6. content (25 octets of application/x-www-form-urlencoded):
  7. {"name": "Name", "id": 1}
  8.  
  9. $ curl --json '{"name": "Name", "id": 1}' http://localhost:8080
  10. 2022-08-10T11:54:28: POST / from 127.0.0.1:34654 (curl/7.84.0)
  11. content (25 octets of application/json):
  12. {"name": "Name", "id": 1}
  13.  
  14. $ eltclsh
  15.  
  16. eltclsh1.18 - Copyright (C) 2001-2020 LAAS-CNRS
  17.  
  18. eltclsh > exec curl --data {{"name": "Name", "id": 1}} http://localhost:8080
  19. 2022-08-10T11:54:54: POST / from 127.0.0.1:55504 (curl/7.84.0)
  20. content (25 octets of application/x-www-form-urlencoded):
  21. {"name": "Name", "id": 1}
  22.  
  23. % Total % Received % Xferd Average Speed Time Time Time Current
  24. Dload Upload Total Spent Left Speed
  25.  
  26. 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
  27. 100 25 0 0 100 25 0 28669 --:--:-- --:--:-- --:--:-- 25000
  28. eltclsh > exec curl --json {{"name": "Name", "id": 1}} http://localhost:8080
  29. 2022-08-10T11:55:01: POST / from 127.0.0.1:55514 (curl/7.84.0)
  30. content (25 octets of application/json):
  31. {"name": "Name", "id": 1}
  32.  
  33. % Total % Received % Xferd Average Speed Time Time Time Current
  34. Dload Upload Total Spent Left Speed
  35.  
  36. 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
  37. 100 25 0 0 100 25 0 28571 --:--:-- --:--:-- --:--:-- 25000
  38. eltclsh >