Definition at line 161 of file http_parser.cpp.hpp.
161 {
163 if (!crlfPos.has_value()) {
164 return false;
165 }
166
167
168 fl::string line(
reinterpret_cast<const char*
>(
mBuffer.data()), crlfPos.value());
169
171
172
173 size_t methodEnd = line.find(' ');
175 return false;
176 }
177
178 size_t uriEnd = line.find(' ', methodEnd + 1);
180 return false;
181 }
182
184 req().
uri = line.
substr(methodEnd + 1, uriEnd - methodEnd - 1);
186
187 return true;
188}
fl::optional< size_t > findCRLF() const
string substr(fl::size start, fl::size length) const FL_NOEXCEPT
static constexpr fl::size npos
References consume(), fl::basic_string::find(), findCRLF(), mBuffer, fl::HttpRequest::method, fl::string::npos, req(), fl::string::substr(), fl::HttpRequest::uri, and fl::HttpRequest::version.
Referenced by feed().