Skip to content

cl04/rest1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

rest1

service below rest api:

url base: http://localhost:8000

  1. end point 1, query all users with uid >= 100. ep = /users (http://localhost:8000/users)
  2. end point 2, query user by user id or group id, ep = /user?uid=<UID>&gid=<GID> (return list of users)

return json object

data User = User {
    username :: String
  , userid   :: Int
  , groupid  :: Int
  , shell    :: String
}

userdb should read from /etc/passwd satisfy [1.]

(optional) Client: query server with similar manor, although using a web browser is also sufficient.

About

simple rest server/client test

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors