LibWeb: Implement multipart/form-data encoding algorithm

This commit is contained in:
Kenneth Myhra 2023-04-02 21:32:23 +02:00 committed by Linus Groh
commit 84722ae2ef
Notes: sideshowbarker 2024-07-17 06:28:38 +09:00
3 changed files with 90 additions and 0 deletions

View file

@ -10,7 +10,13 @@
namespace Web::HTML {
struct SerializedFormData {
String boundary;
ByteBuffer serialized_data;
};
WebIDL::ExceptionOr<XHR::FormDataEntry> create_entry(JS::Realm& realm, String const& name, Variant<JS::NonnullGCPtr<FileAPI::Blob>, String> const& value, Optional<String> const& filename = {});
WebIDL::ExceptionOr<Optional<Vector<XHR::FormDataEntry>>> construct_entry_list(JS::Realm&, HTMLFormElement&);
ErrorOr<SerializedFormData> serialize_to_multipart_form_data(Vector<XHR::FormDataEntry> const& entry_list);
}