1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 19:15:09 +00:00

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
parent 69e8216f2c
commit 84722ae2ef
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);
}