This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
JJJan's profile picture

Unix Timestamp HTTP API

Started by JJJan, 03 October 2015 - 04:36 PM
JJJan #1
Posted 03 October 2015 - 06:36 PM
Since services like currentmillis.com often experience downtime, I wrote a small API which can be found at cc.nghty.co.

Available Endpoints
  • /seconds Seconds since Unix Epoch
  • /milliseconds Milliseconds since Unix Epoch
  • /utc UTC Date
Example Usage


request = http.get("http://cc.nghty.co/seconds")
seconds = request.readAll()
request.close()
Bomb Bloke #2
Posted 12 October 2015 - 12:51 PM
Gave this a try, but didn't have much luck - the "get" request comes back as nil.

The requested pages open correctly in my browser (site's up).

I can "get" pages from other domains (CC's online).

The site isn't blocked via CC's whitelist configuration.

Any idea what might be going on?
1lann #3
Posted 12 October 2015 - 01:13 PM
Gave this a try, but didn't have much luck - the "get" request comes back as nil.

The requested pages open correctly in my browser (site's up).

I can "get" pages from other domains (CC's online).

The site isn't blocked via CC's whitelist configuration.

Any idea what might be going on?

He's using Cloudflare. His Cloudflare security options are probably set to something too high that it blocks requests with Java's user agent header.