Skip to content

RESTful API F5

annypanny edited this page Nov 29, 2016 · 10 revisions

/author/friend_request/[author_id]

  • It used to send friend request to the given author id locally.
  • The sever return some message.

Method:

POST

Example:

GET /author/friend_request/d2325f9c-09de-492a-83a9-409047905e40


HTTP 405 Method Not Allowed
Allow: POST, OPTIONS
Content-Type: application/json
Vary: Accept

{
	"detail": "Method \"GET\" not allowed."
}

if there is already friend request sent to the same author, after post, it would return:

POST /author/friend_request/d2325f9c-09de-492a-83a9-409047905e40

HTTP 400 Bad Request
Allow: POST, OPTIONS
Content-Type: application/json
Vary: Accept

if you haven't send the friend request to this person before, after post, it would return:

POST /author/friend_request/d2325f9c-09de-492a-83a9-409047905e40

HTTP 202 Accepted
Allow: POST, OPTIONS
Content-Type: application/json
Vary: Accept
Clone this wiki locally