Bu isteğin sonucu olarak yeni bir kaynak oluşur. Düzgün çalışan bir API, bu kaynağa işaret eden bir Location başlığı ve genellikle oluşturulan temsili de gövde olarak gönderir.
Tanımlandığı yer RFC 9110 §15.3.2 — 201 Created · MDN referansı
Kayıtlar, siparişler, yüklemeler, rezervasyonlar, yorumlar — bir POST isteğinin ardından kendi adresine sahip bir şey bıraktığı ve çağıranın büyük olasılıkla bir an sonra onu almak veya değiştirmek isteyeceği her şey.
Sadece durumu değil, Konum başlığını da kontrol edin; takip URL'sini kendileri oluşturan istemciler, sunucu kimlik şemasını ilk kez değiştirdiğinde hata verir.
Location başlığını okuyup onu izleyin; URL'yi gövdedeki id'den kendiniz oluşturmayın. Sunucular id düzenlerini değiştirir; tahmin eden istemciler o gün bozulur. Gövde oluşturulan temsili taşıyorsa, hemen yeniden çekmek yerine onu kullanın.
Bu oyun alanında 59 uç nokta 201 ile yanıt veriyor. Hepsi ücretsizdir, kayıt gerektirmez ve tarayıcıdan ya da curl ile çağrılabilir.
POST https://funapi.dev/api/friends/v1/characters — Create a character (Friends API) Bu uç noktayı aç ve çalıştırPOST https://funapi.dev/api/friends/v1/characters/bulk — Batch-create characters (array body, per-item validation) (Friends API) Bu uç noktayı aç ve çalıştırPOST https://funapi.dev/api/superheroes/v1/heroes — Register a new hero (Superhero API) Bu uç noktayı aç ve çalıştırPOST https://funapi.dev/api/superheroes/v1/heroes/versus — Simulate a fight between two heroes (Superhero API) Bu uç noktayı aç ve çalıştırPOST https://funapi.dev/api/pizza/v1/orders — Place an order (validated) (Pizza Orders API) Bu uç noktayı aç ve çalıştırPOST https://funapi.dev/api/coffee/v1/orders — Order a drink (Coffee Shop API) Bu uç noktayı aç ve çalıştırPOST https://funapi.dev/api/football/v1/matches — Simulate a match (Football API) Bu uç noktayı aç ve çalıştırPOST https://funapi.dev/api/movies/v1/movies — Add a movie (Movies API) Bu uç noktayı aç ve çalıştırPOST https://funapi.dev/api/movies/v1/movies/{id}/poster — Upload a movie poster (simulated multipart file upload) (Movies API) Bu uç noktayı aç ve çalıştırPOST https://funapi.dev/api/wizarding/v1/students — Enroll a student (Harry Potter API) Bu uç noktayı aç ve çalıştırPOST https://funapi.dev/api/galaxy/v1/characters — Add a character (Star Wars API) Bu uç noktayı aç ve çalıştırPOST https://funapi.dev/api/holmes/v1/suspects — Add a suspect to a case (Sherlock Holmes API) Bu uç noktayı aç ve çalıştırPOST https://funapi.dev/api/pokemon/v1/pokemon — Catch a new Pokémon (create) (Pokémon API) Bu uç noktayı aç ve çalıştırPOST https://funapi.dev/api/pokemon/v1/battles — Simulate a battle between two Pokémon (Pokémon API) Bu uç noktayı aç ve çalıştırPOST https://funapi.dev/api/middleearth/v1/fellowship — Recruit a new member (Middle-earth API) Bu uç noktayı aç ve çalıştırPOST https://funapi.dev/api/webhooks/v1/subscriptions — Register a webhook subscription (Webhooks API) Bu uç noktayı aç ve çalıştırPOST https://funapi.dev/api/webhooks/v1/trigger — Fire an event to all matching subscriptions (real HTTP POST) (Webhooks API) Bu uç noktayı aç ve çalıştırPOST https://funapi.dev/api/office/v1/employees — Hire a new employee (The Office API) Bu uç noktayı aç ve çalıştırPOST https://funapi.dev/api/dinopark/v1/dinosaurs — Add a dinosaur (409 if enclosure is at capacity) (Dino Park API) Bu uç noktayı aç ve çalıştırPOST https://funapi.dev/api/dinopark/v1/incidents/breach — Simulate a containment breach (random dinosaur & severity) (Dino Park API) Bu uç noktayı aç ve çalıştırPOST https://funapi.dev/api/marvel/v1/heroes — Recruit a new hero (Marvel API) Bu uç noktayı aç ve çalıştırPOST https://funapi.dev/api/marvel/v1/missions — Assign heroes to a new mission (Marvel API) Bu uç noktayı aç ve çalıştırPOST https://funapi.dev/api/got/v1/nobles — Add a noble to a house (Game of Thrones API) Bu uç noktayı aç ve çalıştırPOST https://funapi.dev/api/got/v1/battles — Simulate a battle between two houses (Game of Thrones API) Bu uç noktayı aç ve çalıştırPOST https://funapi.dev/api/rickandmorty/v1/characters — Add a character (Rick and Morty API) Bu uç noktayı aç ve çalıştır…ve katalog genelinde 34 uç nokta daha.
Tüm HTTP durum kodları · 55 mock REST API’nin tamamı · Başlangıç rehberi
Son güncelleme