Lines Matching refs:string
9 #include <string>
49 FormField(const std::string& name,
50 const std::string& content_disposition,
51 const std::string& content_type,
52 const std::string& transfer_encoding);
58 virtual std::string GetContentDisposition() const;
62 virtual std::string GetContentType() const;
64 // Returns a string with all of the field headers, delimited by CRLF
66 std::string GetContentHeader() const;
77 std::string name_;
81 std::string content_disposition_;
84 std::string content_type_;
88 std::string transfer_encoding_;
103 TextFormField(const std::string& name,
104 const std::string& data,
105 const std::string& content_type = {},
106 const std::string& transfer_encoding = {});
111 std::string data_; // Buffer/reader for field data.
127 FileFormField(const std::string& name,
129 const std::string& file_name,
130 const std::string& content_disposition,
131 const std::string& content_type,
132 const std::string& transfer_encoding = {});
136 std::string GetContentDisposition() const override;
142 std::string file_name_;
157 // If omitted/empty, a random string is generated.
158 explicit MultiPartFormField(const std::string& name,
159 const std::string& content_type = {},
160 const std::string& boundary = {});
164 std::string GetContentType() const override;
173 void AddTextField(const std::string& name, const std::string& data);
176 bool AddFileField(const std::string& name,
178 const std::string& content_disposition,
179 const std::string& content_type,
182 // Returns a boundary string used to separate multipart form fields.
183 const std::string& GetBoundary() const { return boundary_; }
186 // Returns the starting boundary string: "--<boundary>".
187 std::string GetBoundaryStart() const;
188 // Returns the ending boundary string: "--<boundary>--".
189 std::string GetBoundaryEnd() const;
191 std::string boundary_; // Boundary string used as field separator.
201 // Allows to specify a custom |boundary| separator string.
202 explicit FormData(const std::string& boundary);
209 void AddTextField(const std::string& name, const std::string& data);
212 bool AddFileField(const std::string& name,
214 const std::string& content_type,
217 // Returns the complete content type string to be used in HTTP requests.
218 std::string GetContentType() const;