2026-05-03 14:12:09 -03:00
|
|
|
#include <LibCore/AnonymousBuffer.h>
|
2024-09-19 02:54:24 -03:00
|
|
|
#include <LibCore/Proxy.h>
|
2026-01-20 19:12:36 -03:00
|
|
|
#include <LibHTTP/Cache/CacheMode.h>
|
2026-02-05 14:25:14 -03:00
|
|
|
#include <LibHTTP/Cache/DiskCacheSettings.h>
|
2026-05-03 14:12:09 -03:00
|
|
|
#include <LibHTTP/Cache/Utilities.h>
|
2026-02-07 16:06:22 -03:00
|
|
|
#include <LibHTTP/Cookie/IncludeCredentials.h>
|
2025-11-26 16:13:23 -03:00
|
|
|
#include <LibHTTP/Header.h>
|
2026-03-11 16:10:08 -03:00
|
|
|
#include <LibIPC/TransportHandle.h>
|
2024-03-18 00:22:27 -03:00
|
|
|
#include <LibURL/URL.h>
|
2024-09-19 02:54:24 -03:00
|
|
|
#include <RequestServer/CacheLevel.h>
|
2026-04-13 17:53:29 -03:00
|
|
|
#include <RequestServer/RequestType.h>
|
2021-07-03 01:40:44 -03:00
|
|
|
|
2021-04-23 17:45:52 -03:00
|
|
|
endpoint RequestServer
|
|
|
|
|
{
|
2025-01-03 13:19:46 -03:00
|
|
|
init_transport(int peer_pid) => (int peer_pid)
|
2026-03-11 16:10:08 -03:00
|
|
|
connect_new_client() => (IPC::TransportHandle handle)
|
|
|
|
|
connect_new_clients(size_t count) => (Vector<IPC::TransportHandle> handles)
|
2024-04-10 19:02:40 -03:00
|
|
|
|
2026-02-05 14:25:14 -03:00
|
|
|
set_disk_cache_settings(HTTP::DiskCacheSettings disk_cache_settings) =|
|
|
|
|
|
|
2024-11-01 19:53:43 -03:00
|
|
|
// use_tls: enable DNS over TLS
|
2025-05-13 07:34:55 -03:00
|
|
|
set_dns_server(ByteString host_or_address, u16 port, bool use_tls, bool validate_dnssec_locally) =|
|
2025-04-07 22:56:35 -03:00
|
|
|
set_use_system_dns() =|
|
2024-11-01 19:53:43 -03:00
|
|
|
|
2021-04-23 17:45:52 -03:00
|
|
|
// Test if a specific protocol is supported, e.g "http"
|
2023-12-16 11:19:34 -03:00
|
|
|
is_supported_protocol(ByteString protocol) => (bool supported)
|
2021-04-23 17:45:52 -03:00
|
|
|
|
2026-02-07 16:06:22 -03:00
|
|
|
start_request(u64 request_id, ByteString method, URL::URL url, Vector<HTTP::Header> request_headers, ByteBuffer request_body, HTTP::CacheMode cache_mode, HTTP::Cookie::IncludeCredentials include_credentials, Core::ProxyData proxy_data) =|
|
2025-12-12 11:56:53 -03:00
|
|
|
stop_request(u64 request_id) => (bool success)
|
|
|
|
|
set_certificate(u64 request_id, ByteString certificate, ByteString key) => (bool success)
|
2021-09-27 17:36:52 -03:00
|
|
|
|
2025-12-11 16:31:12 -03:00
|
|
|
ensure_connection(u64 request_id, URL::URL url, ::RequestServer::CacheLevel cache_level) =|
|
2024-03-05 21:50:52 -03:00
|
|
|
|
2026-04-13 17:53:29 -03:00
|
|
|
retrieved_http_cookie(int client_id, u64 request_id, ::RequestServer::RequestType request_type, String cookie) =|
|
2026-02-07 16:06:22 -03:00
|
|
|
|
2025-11-02 15:10:27 -03:00
|
|
|
estimate_cache_size_accessed_since(u64 cache_size_estimation_id, UnixDateTime since) =|
|
2025-11-02 18:44:30 -03:00
|
|
|
remove_cache_entries_accessed_since(UnixDateTime since) =|
|
2026-05-03 15:04:35 -03:00
|
|
|
store_cache_associated_data(URL::URL url, ByteString method, Vector<HTTP::Header> request_headers, Optional<u64> vary_key, HTTP::CacheEntryAssociatedData associated_data, Core::AnonymousBuffer data) => (bool stored)
|
|
|
|
|
retrieve_cache_associated_data(URL::URL url, ByteString method, Vector<HTTP::Header> request_headers, Optional<u64> vary_key, HTTP::CacheEntryAssociatedData associated_data) => (Optional<Core::AnonymousBuffer> data)
|
2026-05-11 10:57:16 -03:00
|
|
|
create_synthetic_cache_entry(URL::URL url, ByteString method) => (bool created)
|
2025-10-09 15:24:47 -03:00
|
|
|
|
2024-03-05 21:50:52 -03:00
|
|
|
// Websocket Connection API
|
2025-12-11 13:58:50 -03:00
|
|
|
websocket_connect(u64 websocket_id, URL::URL url, ByteString origin, Vector<ByteString> protocols, Vector<ByteString> extensions, Vector<HTTP::Header> additional_request_headers) =|
|
|
|
|
|
websocket_send(u64 websocket_id, bool is_text, ByteBuffer data) =|
|
2026-05-14 09:39:07 -03:00
|
|
|
websocket_send_shared(u64 websocket_id, bool is_text, Core::AnonymousBuffer data) =|
|
2025-12-11 13:58:50 -03:00
|
|
|
websocket_close(u64 websocket_id, u16 code, ByteString reason) =|
|
|
|
|
|
websocket_set_certificate(u64 request_id, ByteString certificate, ByteString key) => (bool success)
|
2024-08-03 14:24:56 -03:00
|
|
|
|
2021-04-23 17:45:52 -03:00
|
|
|
}
|