REST (Representational State Transfer) ni mfumo wa kutengeneza API zinazotumia HTTP methods kama GET, POST, PUT, DELETE.
Hii hurahisisha mawasiliano kati ya frontend (client) na backend (server).
English:
REST API allows structured communication using HTTP verbs to access or manipulate resources.
________________________________________
⚙️ Mfano wa Code
🔹 Simple REST API in PHP
<?php
// api.php
header("Content-Type: application/json");

$data = [
["id" => 1, "name" => "Faustine"],
["id" => 2, "name" => "Asha"]
];

echo json_encode($data);
?>
🔹 Fetch API Call
fetch("api.php")
.then(res => res.json())
.then(data => console.log(data));
________________________________________
🎬 YouTube Description
Hapa tumejifunza REST API kwa wanaoanza — jinsi data inavyotoka server hadi frontend kwa njia rahisi kupitia JSON.
🔖 Hashtags
#RESTAPI #PHPAPI #FetchAPI #BackendDevelopment #WebDevelopment #CodingTutorial #FullStack