add target to ZigRequest
This commit is contained in:
parent
0afe78a346
commit
c44ad2ba84
|
@ -36,6 +36,7 @@ threadlocal var allocator: ?*std.mem.Allocator = null;
|
||||||
const log = std.log.scoped(.interface);
|
const log = std.log.scoped(.interface);
|
||||||
|
|
||||||
pub const ZigRequest = struct {
|
pub const ZigRequest = struct {
|
||||||
|
target: []const u8,
|
||||||
method: [:0]u8,
|
method: [:0]u8,
|
||||||
content: []u8,
|
content: []u8,
|
||||||
headers: []Header,
|
headers: []Header,
|
||||||
|
@ -107,6 +108,7 @@ pub fn handleRequest(request: *Request, zigRequestHandler: ZigRequestHandler) ?*
|
||||||
zigRequestHandler(
|
zigRequestHandler(
|
||||||
alloc,
|
alloc,
|
||||||
.{
|
.{
|
||||||
|
.target = request.target[0..request.target_len],
|
||||||
.method = request.method[0..request.method_len :0],
|
.method = request.method[0..request.method_len :0],
|
||||||
.content = request.content[0..request.content_len],
|
.content = request.content[0..request.content_len],
|
||||||
.headers = request.headers[0..request.headers_len],
|
.headers = request.headers[0..request.headers_len],
|
||||||
|
|
Loading…
Reference in New Issue
Block a user