Aman16-ai / Aman16-ai/Boggy

[H] Complete the `Request` Class with Necessary Attributes and Functions

Offen
#2 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement High
Vorherrschende Sprache
C++
Sterne
0
Forks
0
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

### Issue: Complete the `Request` Class with Necessary Attributes and Functions

#### Description
The `Request` class is currently incomplete and needs to be fully implemented. It should include all necessary attributes and functions to handle incoming requests efficiently.

#### Expected Features
- **Attributes:**
- `method` (GET, POST, PUT, DELETE, etc.)
- `url` (Requested URL)
- `headers` (Request headers)
- `body` (Request payload, if applicable)
- `params` (Query parameters)
- `cookies` (Request cookies)

- **Functions:**
- `get_header(name: str) -> str` (Retrieve a specific header)
- `get_param(name: str) -> str` (Retrieve a specific query parameter)
- `get_body() -> dict` (Parse and return request body)
- `get_cookie(name: str) -> str` (Retrieve a specific cookie)

#### Task List
- [ ] Define the `Request` class structure.
- [ ] Implement necessary attributes.
- [ ] Implement getter functions for headers, params, body, and cookies.
- [ ] Write unit tests to validate functionality.

**Labels:** `enhancement` `request-handling`

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.