2024-06-09 13:46:04 +02:00
|
|
|
#include <LibHTTP/HeaderMap.h>
|
2024-03-18 16:22:27 +13:00
|
|
|
#include <LibURL/URL.h>
|
2021-09-28 00:06:52 +03:30
|
|
|
#include <RequestServer/ConnectionCache.h>
|
2021-07-02 21:40:44 -07:00
|
|
|
|
2021-04-23 22:45:52 +02:00
|
|
|
endpoint RequestServer
|
|
|
|
|
{
|
2024-04-17 18:44:39 -06:00
|
|
|
connect_new_client() => (IPC::File client_socket)
|
2024-04-10 16:02:40 -06:00
|
|
|
|
2021-04-23 22:45:52 +02:00
|
|
|
// Test if a specific protocol is supported, e.g "http"
|
2023-12-16 17:49:34 +03:30
|
|
|
is_supported_protocol(ByteString protocol) => (bool supported)
|
2021-04-23 22:45:52 +02:00
|
|
|
|
2024-06-09 13:46:04 +02:00
|
|
|
start_request(i32 request_id, ByteString method, URL::URL url, HTTP::HeaderMap request_headers, ByteBuffer request_body, Core::ProxyData proxy_data) =|
|
2021-05-03 15:52:56 +02:00
|
|
|
stop_request(i32 request_id) => (bool success)
|
2023-12-16 17:49:34 +03:30
|
|
|
set_certificate(i32 request_id, ByteString certificate, ByteString key) => (bool success)
|
2021-09-28 00:06:52 +03:30
|
|
|
|
2024-03-18 16:22:27 +13:00
|
|
|
ensure_connection(URL::URL url, ::RequestServer::CacheLevel cache_level) =|
|
2024-03-06 01:50:52 +01:00
|
|
|
|
|
|
|
|
// Websocket Connection API
|
2024-06-22 10:28:14 +02:00
|
|
|
websocket_connect(URL::URL url, ByteString origin, Vector<ByteString> protocols, Vector<ByteString> extensions, HTTP::HeaderMap additional_request_headers) => (i32 connection_id)
|
2024-03-06 01:50:52 +01:00
|
|
|
websocket_ready_state(i32 connection_id) => (u32 ready_state)
|
|
|
|
|
websocket_subprotocol_in_use(i32 connection_id) => (ByteString subprotocol_in_use)
|
|
|
|
|
websocket_send(i32 connection_id, bool is_text, ByteBuffer data) =|
|
|
|
|
|
websocket_close(i32 connection_id, u16 code, ByteString reason) =|
|
|
|
|
|
websocket_set_certificate(i32 request_id, ByteString certificate, ByteString key) => (bool success)
|
2021-04-23 22:45:52 +02:00
|
|
|
}
|