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