8 #ifndef WPIUTIL_SUPPORT_HTTPUTIL_H_ 9 #define WPIUTIL_SUPPORT_HTTPUTIL_H_ 16 #include "llvm/ArrayRef.h" 17 #include "llvm/SmallString.h" 18 #include "llvm/SmallVector.h" 19 #include "llvm/StringMap.h" 20 #include "llvm/StringRef.h" 21 #include "llvm/Twine.h" 22 #include "support/raw_istream.h" 23 #include "support/raw_socket_istream.h" 24 #include "support/raw_socket_ostream.h" 25 #include "tcpsockets/NetworkStream.h" 42 bool spacePlus =
true);
62 std::string* saveBuf);
75 std::vector<std::pair<std::string, std::string>> params;
84 : host{loc.host}, port{loc.port} {
85 SetPath(loc.path, loc.params);
93 : host{loc.host}, port{loc.port}, path{path_} {
99 : host{loc.host}, port{loc.port} {
100 SetPath(path_, params);
111 template <
typename T>
114 template <
typename T>
118 template <
typename T>
120 return elem.getKey();
122 template <
typename T>
130 HttpConnection(std::unique_ptr<wpi::NetworkStream> stream_,
int timeout)
131 : stream{std::move(stream_)}, is{*stream, timeout}, os{*stream,
true} {}
133 bool Handshake(
const HttpRequest& request, std::string* warnMsg);
135 std::unique_ptr<wpi::NetworkStream> stream;
143 explicit operator bool()
const {
return stream && !is.has_error(); }
148 #include "HttpUtil.inl" 150 #endif // WPIUTIL_SUPPORT_HTTPUTIL_H_ Definition: HttpUtil.h:79
StringMapEntry - This is used to represent one value that is inserted into a StringMap.
Definition: StringMap.h:31
Definition: raw_socket_istream.h:17
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition: Twine.h:79
Definition: SocketError.cpp:17
Definition: HttpUtil.h:64
Definition: raw_istream.h:21
Definition: HttpUtil.h:128
Definition: raw_socket_ostream.h:17
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:42