HTTP Metotları

GET

POST

PUT

  • Belirli bir kaynaktaki verinin tamamının değiştirilmesi için kullanılan metodtur.
  • http://api.example.com/users/1
  • { “name": "Gurcan", "age": 40}

PATCH

DELETE

CONNECT - TRACE - OPTIONS - HEAD

SAFE Metotlar

GET – HEAD – OPTIONS : Sunucu “state” tarafında değişiklik oluşturmazlar. “Read-only” yapısındadırlar.

IDEMPOTENT Metotlar

GET – HEAD - OPTIONS – DELETE – PUT – TRACE : Tekrar durumunda sunucu state yapısında herhangi bir yan etki bırakmazlar. Safe metodlar, idempotent'tır.

Endpoint (Sorgu Adresi)

REST API kullanımında gönderilen istek ile verilen cevap için belirlenen buluşma noktasıdır.

Root(Base) /Path yapısından oluşur, isimler kullanılır, fiil ilgili HTTP metodu ile belirtilir. Dökümantasyon tarafından belirtilir.

Değişen değer için genelde (:) kullanılır.

Sorgu parametreleri için (?) kullanılır.


Daha Fazlası İçin

Quiz

Answer the questions to check your understanding.

This lesson includes a short quiz.

Lesson discussion

Swap insights and ask questions about REST API

Be the first to start the discussion

Ask a question or share your thoughts about this lesson.