Every resource supports plain as well as JSON GET requests. JSON responses can be requested by setting the corresponding Accept header, i.e., Accept: application/json. ip.pdt.sh tries to identify whether a request is sent by CLI client and then only returns the plain response unless JSON is explicitly requested. In this way for example, a simple curl ip.pdt.sh/ retrieves your IP address. You can also add "/json" to any resource to force a JSON response regardless of the Accept header.
> curl ip.pdt.sh/
> wget -qO - ip.pdt.sh/tcp
> http -b ip.pdt.sh/host
> curl -H "Accept: application/json" ip.pdt.sh/ip
> wget -qO- --header=Accept:application/json ip.pdt.sh/tcp
> http -bj ip.pdt.sh/host