أساسيات الويب
في هذه الصفحة 8 موضوعات
نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.
نظرة عامة
الموضوعات
- دوال HTTP (methods)
- رموز الحالة (status codes)
- الترويسات (headers)
- JSON
- عناوين URL
- معاملات الاستعلام (query parameters)
- جسم الطلب (request body)
تعلّم أولًا
71 دقيقة قراءة · 2 ساعة تدريب (تقدير)
مخرجات التعلم
- Describe the structure of an HTTP request and response (method, URL, headers, body, status).
- Choose the right HTTP method and interpret status code classes (2xx, 3xx, 4xx, 5xx).
- Read and write JSON, and map it mentally to Java objects.
- Identify path, query parameters, and fragments in a URL.
الدروس
المختبر والتمارين
Lab
BEG-052-LAB1 · Read real traffic
Outcomes: 1–4 · Time: ~2 h Capture five requests from a real site in the browser's Network tab and annotate method, URL parts, key headers, status, and body type. Acceptance: all parts correctly labeled.
Exercises (assessment: quiz)
| ID | Outcome | Task |
|---|---|---|
| BEG-052-EX01 | 1 | Label the parts of a given raw request and response. |
| BEG-052-EX02 | 2 | Pick a method for: list books, add a book, replace a book, change only a title, delete a book. |
| BEG-052-EX03 | 2 | Name the status class and likely code for: created, not found, not logged in, server crash. |
| BEG-052-EX04 | 3 | Write JSON for a member with a name, an age, and a list of two phone numbers. |
| BEG-052-EX05 | 3 | Draw the Java class that matches your JSON from EX04. |
| BEG-052-EX06 | 4 | Split https://api.example.com/books?author=herbert&page=2#top into its parts. |
| BEG-052-EX07 | 2 | Explain why a "delete" link implemented as GET /deleteBook?id=7 is a bad idea. |
أظهر الحلول
- EX01 Request: method, URL/path, headers, optional body. Response: status line, headers, body.
- EX02
GET,POST,PUT,PATCH,DELETE. - EX03 2xx 201; 4xx 404; 4xx 401; 5xx 500.
- EX04
{"name":"Ana","age":30,"phones":["555-0101","555-0102"]}. - EX05
class Member { String name; int age; List<String> phones; }. - EX06 Scheme
https, hostapi.example.com, path/books, queryauthor=herbert&page=2, fragmenttop. - EX07 A GET must not change data; browsers, crawlers, and caches may repeat it. Use
DELETE /books/7.
الاختبار
Outcomes: O1 request and response anatomy · O2 methods and status codes · O3 JSON · O4 URLs.
اختبار ذاتي لك: لا توجد درجات، ولا يُحفظ أو يُرسل أي شيء. اختر إجابة ثم تحقق منها، ويمكنك المحاولة مرة أخرى كما تشاء.
الجزء العملي
The assessment is this quiz; the lab (BEG-052-LAB1) checks five annotated requests. Pass: at least 8 of 10 quiz questions and all lab parts correctly labeled.
أخطاء شائعة
GET with side effects; treating every error as 500.
التقييم
Quiz.
الصلة بالمسار الوظيفي
HTTP in depth (JNR-017).