Infrastructure medium complexity Shared Component mobile
1
Dependencies
3
Dependents
0
Entities
0
Integrations

Description

Shared HTTP client used across all mobile features to communicate with the Next.js backend. Handles JWT token injection, refresh logic, and standardised error parsing.

Feature: Travel Expense Registration

rest-api-client

Responsibilities

  • Inject Authorization header with current JWT on every request
  • Trigger token refresh flow when 401 responses are received
  • Serialize and deserialize JSON request and response bodies
  • Surface typed API errors to calling service layers

Interfaces

get(path: String): Future<Response>
post(path: String, body: Map): Future<Response>
put(path: String, body: Map): Future<Response>
delete(path: String): Future<Response>

Relationships

Dependencies (1)

Components this component depends on

Dependents (3)

Components that depend on this component