Skip to content

A minimalist Rack application that returns the current time in a specified format.

Notifications You must be signed in to change notification settings

glebson1988/RackApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RackApp

TimeFormatter
A minimalist Rack application that returns the current time in a specified format.
Start the application by running the command: rackup in your console.
Examples of Valid Requests:
1:
curl --url "http://localhost:9292/time?format=year%2Cmonth%2Cday%2Chour" -i
2:
curl --url "http://localhost:9292/time?format=hour%2Cminute%2Csecond" -i
3:
curl --url "http://localhost:9292/time?format=year%2Cmonth%2Cday%2Chour%2Cminute%2Csecond" -i
Example of Invalid Request, returns a 404 status code:
curl --url "http://localhost:9292/date?format=year%2Cmonth%2Cday%2Chour" -i
Unknown format: Returns an error message Unknown time format [epoch, age]":
curl --url "http://localhost:9292/time?format=year%2Cmonth%2Cday%2Chr" -i

About

A minimalist Rack application that returns the current time in a specified format.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages