2024-06-09 11:28:37 +02:00
|
|
|
#include <LibHTTP/HeaderMap.h>
|
2025-03-30 13:09:50 -04:00
|
|
|
#include <LibRequests/NetworkError.h>
|
2025-02-26 13:28:21 +00:00
|
|
|
#include <LibRequests/RequestTimingInfo.h>
|
2024-03-18 16:22:27 +13:00
|
|
|
#include <LibURL/URL.h>
|
2021-07-02 21:40:44 -07:00
|
|
|
|
2021-04-23 22:45:52 +02:00
|
|
|
endpoint RequestClient
|
|
|
|
{
|
2024-02-24 14:36:57 +01:00
|
|
|
request_started(i32 request_id, IPC::File fd) =|
|
2025-02-26 13:28:21 +00:00
|
|
|
request_finished(i32 request_id, u64 total_size, Requests::RequestTimingInfo timing_info, Optional<Requests::NetworkError> network_error) =|
|
2024-10-23 16:45:48 -05:00
|
|
|
headers_became_available(i32 request_id, HTTP::HeaderMap response_headers, Optional<u32> status_code, Optional<String> reason_phrase) =|
|
2021-04-23 22:45:52 +02:00
|
|
|
|
2024-03-06 01:50:52 +01:00
|
|
|
// Websocket API
|
|
|
|
// FIXME: See if this can be merged with the regular APIs
|
2024-09-18 10:28:55 +02:00
|
|
|
websocket_connected(i64 websocket_id) =|
|
|
|
|
websocket_received(i64 websocket_id, bool is_text, ByteBuffer data) =|
|
|
|
|
websocket_errored(i64 websocket_id, i32 message) =|
|
|
|
|
websocket_closed(i64 websocket_id, u16 code, ByteString reason, bool clean) =|
|
|
|
|
websocket_ready_state_changed(i64 websocket_id, u32 ready_state) =|
|
|
|
|
websocket_subprotocol(i64 websocket_id, ByteString subprotocol) =|
|
|
|
|
websocket_certificate_requested(i64 websocket_id) =|
|
2024-03-06 01:50:52 +01:00
|
|
|
|
2021-04-23 22:45:52 +02:00
|
|
|
// Certificate requests
|
2021-05-10 12:37:27 +02:00
|
|
|
certificate_requested(i32 request_id) =|
|
2021-04-23 22:45:52 +02:00
|
|
|
}
|