API & RESTful API: Unterschied zwischen den Versionen

Aus robopagex.com
Zur Navigation springen Zur Suche springen
 
(3 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 7: Zeile 7:
  
 
  '''RESTful API'''
 
  '''RESTful API'''
 +
REpresentational
 +
State
 +
Transfer
 +
 +
Request for data or take an action
 +
 +
'''Request Methods:'''
 +
HTTP GET
 +
HTTP POST
 +
HTTP PUT
 +
HTTP DELETE
 +
HTTP PATCH
 +
 +
'''HTTP Methods for RESTful Requests'''
 +
''HTTP    Method CRUD Operation  Example URL(s)''
 +
GET    Read                    HTTP GET http://website.com/api/users/
 +
                                HTTP GET http://website.com/api/users/1/
 +
POST    Create                  HTTP POST http://website.com/api/users/
 +
DELETE  Delete                  HTTP DELETE http://website.com/api/user/1/
 +
PUT    Update/Replace          HTTP PUT http://website.com/api/user/1/
 +
PATCH  Partial Update/Modify  HTTP PATCH http://website.com/api/user/1/
 +
 +
HTTP STATUS CODES

Aktuelle Version vom 10. November 2023, 18:48 Uhr

API = Application Programming Interface
How computers can talk to other computers
It doesn't matter what language you're using
Quest & Request
RESTful API
REpresentational
State
Transfer
Request for data or take an action
Request Methods:
HTTP GET
HTTP POST
HTTP PUT
HTTP DELETE
HTTP PATCH
HTTP Methods for RESTful Requests
HTTP    Method CRUD Operation   Example URL(s)
GET     Read                    HTTP GET http://website.com/api/users/
                                HTTP GET http://website.com/api/users/1/
POST    Create                  HTTP POST http://website.com/api/users/
DELETE  Delete                  HTTP DELETE http://website.com/api/user/1/
PUT     Update/Replace          HTTP PUT http://website.com/api/user/1/
PATCH   Partial Update/Modify   HTTP PATCH http://website.com/api/user/1/
HTTP STATUS CODES