ChalonaHttp class

Cliente HTTP que proporciona:

  • Comunicación REST con el servidor
  • Conexión WebSocket para mensajes en tiempo real
  • Manejo automático de headers y autenticación
  • Timeout configurable para las peticiones
Inheritance

Constructors

ChalonaHttp({required String host})
Crea un nuevo cliente HTTP host es la URL base del servidor

Properties

hashCode → int
The hash code for this object.
no setterinherited
host → String
WebSocket para comunicación en tiempo real URL base del servidor HTTP
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
wsServer ↔ ChalonaSocketIOServer
getter/setter pairinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
request(String url, {Map data = const {}, String? token, List<ChalonaFile>? files, ChalonaHttpContentType contentType = ChalonaHttpContentType.json, ChalonaHttpMethod method = ChalonaHttpMethod.post}) → Future<ChalonaResponse>
Realiza una petición HTTP al servidor url - Ruta relativa a la URL base data - Datos a enviar en formato JSON token - Token de autenticación (opcional) files - Archivos a enviar (no implementado)
override
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited