summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Fetch/Body.h
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibWeb/Fetch/Body.h')
-rw-r--r--Userland/Libraries/LibWeb/Fetch/Body.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/Userland/Libraries/LibWeb/Fetch/Body.h b/Userland/Libraries/LibWeb/Fetch/Body.h
index 48936a1d4c..0004fcd09d 100644
--- a/Userland/Libraries/LibWeb/Fetch/Body.h
+++ b/Userland/Libraries/LibWeb/Fetch/Body.h
@@ -29,20 +29,22 @@ public:
virtual ErrorOr<Optional<MimeSniff::MimeType>> mime_type_impl() const = 0;
virtual Optional<Infrastructure::Body&> body_impl() = 0;
virtual Optional<Infrastructure::Body const&> body_impl() const = 0;
+ virtual Bindings::PlatformObject& as_platform_object() = 0;
+ virtual Bindings::PlatformObject const& as_platform_object() const = 0;
[[nodiscard]] bool is_unusable() const;
[[nodiscard]] JS::GCPtr<Streams::ReadableStream> body() const;
[[nodiscard]] bool body_used() const;
// JS API functions
- [[nodiscard]] JS::NonnullGCPtr<JS::Promise> array_buffer() const;
- [[nodiscard]] JS::NonnullGCPtr<JS::Promise> blob() const;
- [[nodiscard]] JS::NonnullGCPtr<JS::Promise> form_data() const;
- [[nodiscard]] JS::NonnullGCPtr<JS::Promise> json() const;
- [[nodiscard]] JS::NonnullGCPtr<JS::Promise> text() const;
+ [[nodiscard]] WebIDL::ExceptionOr<JS::NonnullGCPtr<JS::Promise>> array_buffer() const;
+ [[nodiscard]] WebIDL::ExceptionOr<JS::NonnullGCPtr<JS::Promise>> blob() const;
+ [[nodiscard]] WebIDL::ExceptionOr<JS::NonnullGCPtr<JS::Promise>> form_data() const;
+ [[nodiscard]] WebIDL::ExceptionOr<JS::NonnullGCPtr<JS::Promise>> json() const;
+ [[nodiscard]] WebIDL::ExceptionOr<JS::NonnullGCPtr<JS::Promise>> text() const;
};
[[nodiscard]] WebIDL::ExceptionOr<JS::Value> package_data(JS::Realm&, ByteBuffer, PackageDataType, Optional<MimeSniff::MimeType> const&);
-[[nodiscard]] JS::NonnullGCPtr<JS::Promise> consume_body(JS::Realm&, BodyMixin const&, PackageDataType);
+[[nodiscard]] WebIDL::ExceptionOr<JS::NonnullGCPtr<JS::Promise>> consume_body(JS::Realm&, BodyMixin const&, PackageDataType);
}