Skip to content

Test of Aqueduct, a dart framework to host a multi-threaded http server.

Notifications You must be signed in to change notification settings

MatheusHAS/api-dart-aqueduct-mongo

Repository files navigation

api-dart-aqueduct-mongo

Test of Aqueduct, a dart framework to host a multi-threaded http server.

Dependencies

Install\Enable Aqueduct

$ pub global activate aqueduct

Install packages

$ pub get

Run

$ pub run aqueduct serve

Server running in

http://localhost:8888

Routes

List all users

[GET] /api/user

When error: Status Code 404

When success: Status Code 200

{
  "body": [
    {
      "_id": "ObjectId(\"5eb833f9d88ad3aaa371f11d\")",
      "name": "Foo bar"
    }
  ]
}

Get user By ObjectId

[GET] /api/user/{UserObjectId}

When error: Status Code 404

When success: Status Code 200

{
  "_id": "ObjectId(\"5eb833f9d88ad3aaa371f11d\")",
  "name": "Foo bar"
}

Update user

[POST] /api/user/{UserObjectId}

To update, send user data in body request (JSON):

{
  "name": "Update my Name plz"
}

When error: Status Code 500

When success: Status Code 200

{
  "success": true
}

Insert user

[POST] /api/user

To insert new user, send user data in body request (JSON):

{
  "name": "Foo bar"
}

When error: Status Code 500

When success: Status Code 200

{
  "success": true
}

Delete user

[DELETE] /api/user/{UserObjectId}

When error: Status Code 500

When success: Status Code 200

{
  "success": true
}

About

Test of Aqueduct, a dart framework to host a multi-threaded http server.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages