[#HTTPHeaders-Read]
= xref:HTTPHeaders.adoc[HTTPHeaders]::Read
:relfileprefix: ../
:mrdocs:

Parse an HTTP headers section from a line reader&period;

== Synopsis

Declared in `&lt;httpserver&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
Read(
    xref:util/LineReader.adoc[util::LineReader]& reader,
    bool write = true);
----

== Return Value

false if LineReader hits the end of the buffer before reading an , meaning that we are still waiting on more data from the client&period; true after reading an entire HTTP headers section, terminated by an empty line and &period; Throws on an exceeded read limit and on bad headers syntax (e&period;g&period; no &quot;&colon;&quot; in a line)&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *reader* [in]
| A LineReader instance initialized with the client&apos;s receive buffer&period;
| *write* [in]
| Whether or not to write the parsed data to the object after validation&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
