A small app for practising REST APIs with real HTTP requests,
CRUD and pagination on JSONPlaceholder, with no framework at all.
Three files (index.html, style.css, app.js) and one public API. Every button sends a real request through Axios, every response is rendered with plain DOM code, and every failure lands in a catch with a readable message instead of a silent console error.
| Users | "Kullanıcıları Getir" fetches /users and shows each name, email and company. |
| Posts | Five posts load first; "Daha Fazla Yükle" asks for the next page with _limit and _page and appends it. |
| Create | A small form shares a new post with POST /posts. |
| Update | "Düzenle" changes a post with PATCH /posts/:id. |
| Delete | "Sil" removes a post with DELETE /posts/:id. |
| Errors | async / await with try / catch around every call, and a message when a request fails. |
flowchart LR
UI[index.html · buttons and form] --> APP[app.js · Axios instance]
APP -- GET /users --> API[JSONPlaceholder]
APP -- GET /posts?_limit=5&_page=n --> API
APP -- POST /posts --> API
APP -- PATCH /posts/:id --> API
APP -- DELETE /posts/:id --> API
API --> DOM[render cards · or show the error]
JSONPlaceholder answers writes with realistic responses but does not store them, so the page updates its own list after each successful call.
Bu mini proje, gerçek HTTP istekleriyle REST API kullanmayı pratik etmek için hazırlandı. JSONPlaceholder API'si üzerinde kullanıcıları listeleme, gönderileri beşer beşer sayfalayarak yükleme ve gönderi ekleme (POST), düzenleme (PATCH) ve silme (DELETE) işlemleri yapılıyor. Sorgu parametreleri, async / await ve hata yönetimi gösteriliyor. Framework yok; düz HTML, CSS ve JavaScript.
Open index.html in a browser, or serve the folder:
python3 -m http.server 8080