API & RESTful API: Unterschied zwischen den Versionen

Aus robopagex.com
Zur Navigation springen Zur Suche springen
 
(2 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 10: Zeile 10:
 
  State
 
  State
 
  Transfer
 
  Transfer
 +
 +
Request for data or take an action
  
 
  '''Request Methods:'''
 
  '''Request Methods:'''
Zeile 17: Zeile 19:
 
  HTTP DELETE
 
  HTTP DELETE
 
  HTTP PATCH
 
  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