Skip to content

navspeak/CommentAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

CommentProj

List all comments

GET /comments

Example: GET http://localhost:8080/comments

[
    {
        "id": 1,
        "text": "This is a kosher comment. Respectful and descent"
    },
    {
        "id": 2,
        "text": "This is a good comment."
    }
]

POST a comment

POST /comments

{ 
   "text": "Your text" 
}

NOTE: if you want to update an existing comment provide the comment ID in the JSON Body e.g:

    {
        "id": 1,
        "text": "This is a Update to comment Id 1"
    }

OFFENSIVE Comment is not allowed

POST

 {
        "text": "This is a bad comment."
  }

Response:

{
    "timestamp": "2018-04-07T08:20:40.913+0000",
    "status": 406,
    "error": "Not Acceptable",
    "message": "Offensive Comment!!!",
    "path": "/comments"
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages