struct FetchOptions [src]

Fields

server_header_buffer: ?[]u8 = null
redirect_behavior: ?Request.RedirectBehavior = null
response_storage: ResponseStorage = .ignoreIf the server sends a body, it will be appended to this ArrayList. max_append_size provides an upper limit for how much they can grow.
max_append_size: ?usize = null
location: Location
method: ?http.Method = null
payload: ?[]const u8 = null
raw_uri: bool = false
keep_alive: bool = true
headers: Request.Headers = .{}Standard headers that have default, but overridable, behavior.
extra_headers: []const http.Header = &.{}These headers are kept including when following a redirect to a different domain. Externally-owned; must outlive the Request.
privileged_headers: []const http.Header = &.{}These headers are stripped when following a redirect to a different domain. Externally-owned; must outlive the Request.

Members

Source

pub const FetchOptions = struct { server_header_buffer: ?[]u8 = null, redirect_behavior: ?Request.RedirectBehavior = null, /// If the server sends a body, it will be appended to this ArrayList. /// `max_append_size` provides an upper limit for how much they can grow. response_storage: ResponseStorage = .ignore, max_append_size: ?usize = null, location: Location, method: ?http.Method = null, payload: ?[]const u8 = null, raw_uri: bool = false, keep_alive: bool = true, /// Standard headers that have default, but overridable, behavior. headers: Request.Headers = .{}, /// These headers are kept including when following a redirect to a /// different domain. /// Externally-owned; must outlive the Request. extra_headers: []const http.Header = &.{}, /// These headers are stripped when following a redirect to a different /// domain. /// Externally-owned; must outlive the Request. privileged_headers: []const http.Header = &.{}, pub const Location = union(enum) { url: []const u8, uri: Uri, }; pub const ResponseStorage = union(enum) { ignore, /// Only the existing capacity will be used. static: *std.ArrayListUnmanaged(u8), dynamic: *std.ArrayList(u8), }; }