Ace.HTTP1.Parser (ace v0.19.0) View Source

Incrementally parse an HTTP/1.x request.

Link to this section Summary

Types

Available options when initializing a new parser

State tracking the progress of the Parser.

Functions

Has the parser consumed and entire HTTP message?

Initial state for the incremental parser.

Run the parser aginst a some new input.

Link to this section Types

Specs

option() :: {:max_line_length, integer()}

Available options when initializing a new parser

Specs

state()

State tracking the progress of the Parser.

Link to this section Functions

Specs

done?(state()) :: boolean()

Has the parser consumed and entire HTTP message?

Specs

new([option()]) :: state()

Initial state for the incremental parser.

Link to this function

parse(binary, state, parts \\ [])

View Source

Specs

parse(String.t(), state(), [Raxx.part()]) ::
  {:ok, {[Raxx.part()], state()}} | {:error, term()}

Run the parser aginst a some new input.

This parser returns a list of parts that are in the input and an updated state.