Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Public Function

readerExpectContinue

Public Function
std.http.Server.Request.readerExpectContinue
pub fn readerExpectContinue(request: *Request, buffer: []u8) ExpectContinueError!*Reader

In the case that the request contains "expect: 100-continue", this function writes the continuation header, which means it can fail with a write error. After sending the continuation header, it sets the request's expect field to null.

Asserts that this function is only called once.

See readerExpectNone for an infallible alternative that cannot write to the server output stream.

Params

File

http/Server.zig:577
577
578
579
580
581
582
    pub fn readerExpectContinue(request: *Request, buffer: []u8) ExpectContinueError!*Reader {
        const flush = request.head.expect != null;
        try writeExpectContinue(request);
        if (flush) try request.server.out.flush();
        return readerExpectNone(request, buffer);
    }