A simple unix timestamp converter API made in swift, for testing Vapor.
POST
/converter
Convert a date from UTC to Unix
name | type | data type | body |
---|---|---|---|
Date | required | JSON | { "date": "dd/mm/yyyy" } |
http code | content-type | response |
---|---|---|
200 |
text/plain;charset=UTF-8 |
{ "unix_timestamp": 1234567890 } |
400 |
application/json |
{ "error": "Formato de data inválido. Use dd/mm/yyyy." } |
curl -X POST -H "Content-Type: application/json" -d '{ "date": "13/11/2023" }' http://localhost:9001/converter