
This makes XHR now rely on Fetch, which allows it to correct send Origin and Referer headers, CORS-preflight and filtering and many other goodies. The main thing that's missing is Streams, which means we can't properly produce progress events or switch to the Loading ready state. This also doesn't implement the Document responseType just yet.
25 lines
517 B
C++
25 lines
517 B
C++
/*
|
|
* Copyright (c) 2023, Luke Wilde <lukew@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <LibWeb/XHR/XMLHttpRequestEventTarget.h>
|
|
|
|
namespace Web::XHR {
|
|
|
|
class XMLHttpRequestUpload : public XMLHttpRequestEventTarget {
|
|
WEB_PLATFORM_OBJECT(XMLHttpRequestUpload, XMLHttpRequestEventTarget);
|
|
|
|
public:
|
|
virtual ~XMLHttpRequestUpload() override;
|
|
|
|
private:
|
|
XMLHttpRequestUpload(JS::Realm&);
|
|
|
|
virtual JS::ThrowCompletionOr<void> initialize(JS::Realm&) override;
|
|
};
|
|
|
|
}
|