Skip to main content

Here It is my solution which based on REST guides and recommendations:

LOGIN - create a resource

Request:

POST => https://example.com/sessions/ BODY => {'login': '[email protected]', 'password': '123456'} 

Response:

http status code 201 (Created) {'token': '761b69db-ace4-49cd-84cb-4550be231e8f'} 

LOGOUT - delete a resource

Request:

DELETE => https://example.com/sessions/761b69db-ace4-49cd-84cb-4550be231e8f/ 

Response:

http status code 204 (No Content) 

Here It is my solution which based on REST guides and recommendations:

LOGIN - create a resource

Request:

POST => https://example.com/sessions/ BODY => {'login': '[email protected]', 'password': '123456'} 

Response:

http status code 201 (Created) {'token': '761b69db-ace4-49cd-84cb-4550be231e8f'} 

LOGOUT - delete a resource

Request:

DELETE => https://example.com/sessions/761b69db-ace4-49cd-84cb-4550be231e8f/ 

Response:

http status code 204 (No Content) 

Here is my solution based on REST guides and recommendations:

LOGIN - create a resource

Request:

POST => https://example.com/sessions/ BODY => {'login': '[email protected]', 'password': '123456'} 

Response:

http status code 201 (Created) {'token': '761b69db-ace4-49cd-84cb-4550be231e8f'} 

LOGOUT - delete a resource

Request:

DELETE => https://example.com/sessions/761b69db-ace4-49cd-84cb-4550be231e8f/ 

Response:

http status code 204 (No Content) 
added 13 characters in body
Source Link
Ali Mamedov
  • 5.2k
  • 3
  • 38
  • 51

Here It is my solution which based on REST guides and recommendations:

LOGIN - create a resource

Request:

POST => https://example.com/sessions/ BODY => {'login': '[email protected]', 'password': '123456'} 

Response:

http status code 201 (Created) {'token': '761b69db-ace4-49cd-84cb-4550be231e8f'} 

LOGOUT - delete a resource

Request:

DELETE => https://example.com/sessions/761b69db-ace4-49cd-84cb-4550be231e8f/ 

Response:

http status code 200204 (No Content) 

Here It is my solution which based on REST guides and recommendations:

LOGIN - create a resource

Request:

POST => https://example.com/sessions/ BODY => {'login': '[email protected]', 'password': '123456'} 

Response:

http status code 201 {'token': '761b69db-ace4-49cd-84cb-4550be231e8f'} 

LOGOUT - delete a resource

Request:

DELETE => https://example.com/sessions/761b69db-ace4-49cd-84cb-4550be231e8f/ 

Response:

http status code 200 

Here It is my solution which based on REST guides and recommendations:

LOGIN - create a resource

Request:

POST => https://example.com/sessions/ BODY => {'login': '[email protected]', 'password': '123456'} 

Response:

http status code 201 (Created) {'token': '761b69db-ace4-49cd-84cb-4550be231e8f'} 

LOGOUT - delete a resource

Request:

DELETE => https://example.com/sessions/761b69db-ace4-49cd-84cb-4550be231e8f/ 

Response:

http status code 204 (No Content) 
Source Link
Ali Mamedov
  • 5.2k
  • 3
  • 38
  • 51

Here It is my solution which based on REST guides and recommendations:

LOGIN - create a resource

Request:

POST => https://example.com/sessions/ BODY => {'login': '[email protected]', 'password': '123456'} 

Response:

http status code 201 {'token': '761b69db-ace4-49cd-84cb-4550be231e8f'} 

LOGOUT - delete a resource

Request:

DELETE => https://example.com/sessions/761b69db-ace4-49cd-84cb-4550be231e8f/ 

Response:

http status code 200