#trying to print a response from a get request (I'm new)
1 messages · Page 1 of 1 (latest)
in line 32, it should be .{body} instead of body
doesn’t fix my problem
but Ty
It has to do with u8
if I do = [] it complains that it isnt []u8 and if I do = []u8 then it is comparing it as a type and not a value
and anything else I do just doesn’t match []u8
you want to do &.{} for an empty []const u8
although &[_]u8{} is also completely valid
are you sure that’s the issue?
When I do that I get the error above
I see that undefined is used mostly
and here example with allocator
const server_header_buffer: []u8 = try self.allocator.alloc(u8, 8*1024*4);
var req = try client.open(.POST, uri, std.http.Client.RequestOptions{
.server_header_buffer = server_header_buffer,
.headers = headers,
});