79128704

Date: 2024-10-26 14:17:49
Score: 2
Natty:
Report link

In the future, please provide a link, not a screenshot, to the documentation.

https://timeapi.io/swagger/index.html

The example is written in Python.

Specify the request method (in this case post) and pass the request body in data or json.

I usually prefer json if possible.

import requests

response = requests.post(
    url='https://timeapi.io/api/calculation/custom/increment',
    json={
        "timeZone": "Europe/Amsterdam",
        "dateTime": "2024-11-27 05:45:00",
        "timeSpan": "16:03:45:17",
        "dstAmbiguity": ""
    }
)

print(response.status_code)
print(response.json())

If you use the past tense from the example in dateTime you will get an error.

requests.exceptions.SSLError: HTTPSConnectionPool(host='timeapi.io', port=443): Max retries exceeded with url: /api/calculation/custom/increment (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1002)')))

Reasons:
  • RegEx Blacklisted phrase (2.5): please provide
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: ykoavlil