mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-06 17:48:37 +00:00
LibWeb: Add URLSearchParams as part of union type for XHR::send()
This patch adds support for URLSearchParams to XHR::send() and introduces the union type XMLHttpRequestBodyInit. XHR::send() now has support for String and URLSearchParams.
This commit is contained in:
parent
bd74db157a
commit
247951e09c
Notes:
sideshowbarker
2024-07-17 09:36:40 +09:00
Author: https://github.com/kennethmyhra
Commit: 247951e09c
Pull-request: https://github.com/SerenityOS/serenity/pull/14515
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/linusg
4 changed files with 40 additions and 5 deletions
|
@ -1,5 +1,8 @@
|
|||
#import <XHR/XMLHttpRequestEventTarget.idl>
|
||||
#import <DOM/EventHandler.idl>
|
||||
#import <URL/URLSearchParams.idl>
|
||||
|
||||
typedef (URLSearchParams or USVString) XMLHttpRequestBodyInit;
|
||||
|
||||
enum XMLHttpRequestResponseType {
|
||||
"",
|
||||
|
@ -30,7 +33,7 @@ interface XMLHttpRequest : XMLHttpRequestEventTarget {
|
|||
undefined open(DOMString method, DOMString url);
|
||||
undefined open(ByteString method, USVString url, boolean async, optional USVString? username = {}, optional USVString? password = {});
|
||||
undefined setRequestHeader(DOMString name, DOMString value);
|
||||
undefined send(optional USVString body = {});
|
||||
undefined send(optional XMLHttpRequestBodyInit? body = null);
|
||||
|
||||
ByteString? getResponseHeader(ByteString name);
|
||||
ByteString getAllResponseHeaders();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue