diff options
author | 2023-02-13 00:50:15 -0800 | |
---|---|---|
committer | 2023-02-13 00:50:15 -0800 | |
commit | aa0762e4660bb17b86890b923368e5a0dc8daf7b (patch) | |
tree | a134621368f9def9a85473e90a6189afb956b457 /src/bun.js/bindings/headers.h | |
parent | cdbc620104b939f7112fa613ca192e5fe6e02a7d (diff) | |
download | bun-aa0762e4660bb17b86890b923368e5a0dc8daf7b.tar.gz bun-aa0762e4660bb17b86890b923368e5a0dc8daf7b.tar.zst bun-aa0762e4660bb17b86890b923368e5a0dc8daf7b.zip |
Implement `FormData` (#2051)
* Backport std::forward change
* Implement `FormData`
* Fix io_darwin headers issue
* Implement `Blob` support in FormData
* Add test for file upload
* Fix bug with Blob not reading Content-Type
* Finish implementing FormData
* Add FormData to types
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Diffstat (limited to 'src/bun.js/bindings/headers.h')
-rw-r--r-- | src/bun.js/bindings/headers.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/bun.js/bindings/headers.h b/src/bun.js/bindings/headers.h index 2d0f567d8..159a7acbd 100644 --- a/src/bun.js/bindings/headers.h +++ b/src/bun.js/bindings/headers.h @@ -1,5 +1,5 @@ // clang-format off -//-- AUTOGENERATED FILE -- 1674546420 +//-- AUTOGENERATED FILE -- 1676266700 #pragma once #include <stddef.h> @@ -55,8 +55,8 @@ typedef void* JSClassRef; typedef bJSC__JSObject JSC__JSObject; // JSC::JSObject typedef WebSocketClient WebSocketClient; typedef WebSocketHTTPSClient WebSocketHTTPSClient; - typedef bJSC__VM JSC__VM; // JSC::VM typedef JSClassRef JSClassRef; + typedef bJSC__VM JSC__VM; // JSC::VM typedef Bun__ArrayBuffer Bun__ArrayBuffer; typedef Uint8Array_alias Uint8Array_alias; typedef WebSocketClientTLS WebSocketClientTLS; @@ -72,6 +72,7 @@ typedef void* JSClassRef; typedef bJSC__JSInternalPromise JSC__JSInternalPromise; // JSC::JSInternalPromise typedef bJSC__Exception JSC__Exception; // JSC::Exception typedef bJSC__JSString JSC__JSString; // JSC::JSString + typedef struct WebCore__DOMFormData WebCore__DOMFormData; // WebCore::DOMFormData typedef struct JSC__CallFrame JSC__CallFrame; // JSC::CallFrame typedef struct WebCore__FetchHeaders WebCore__FetchHeaders; // WebCore::FetchHeaders @@ -92,6 +93,7 @@ typedef void* JSClassRef; class ThrowScope; } namespace WebCore { + class DOMFormData; class DOMURL; class FetchHeaders; } @@ -120,6 +122,7 @@ typedef void* JSClassRef; using JSC__VM = JSC::VM; using JSC__CallFrame = JSC::CallFrame; using JSC__ThrowScope = JSC::ThrowScope; + using WebCore__DOMFormData = WebCore::DOMFormData; using WebCore__DOMURL = WebCore::DOMURL; using WebCore__FetchHeaders = WebCore::FetchHeaders; @@ -146,6 +149,15 @@ CPP_DECL WebCore__DOMURL* WebCore__DOMURL__cast_(JSC__JSValue JSValue0, JSC__VM* CPP_DECL void WebCore__DOMURL__href_(WebCore__DOMURL* arg0, ZigString* arg1); CPP_DECL void WebCore__DOMURL__pathname_(WebCore__DOMURL* arg0, ZigString* arg1); +#pragma mark - WebCore::DOMFormData + +CPP_DECL void WebCore__DOMFormData__append(WebCore__DOMFormData* arg0, ZigString* arg1, ZigString* arg2); +CPP_DECL void WebCore__DOMFormData__appendBlob(WebCore__DOMFormData* arg0, JSC__JSGlobalObject* arg1, ZigString* arg2, void* arg3, ZigString* arg4); +CPP_DECL size_t WebCore__DOMFormData__count(WebCore__DOMFormData* arg0); +CPP_DECL JSC__JSValue WebCore__DOMFormData__create(JSC__JSGlobalObject* arg0); +CPP_DECL JSC__JSValue WebCore__DOMFormData__createFromURLQuery(JSC__JSGlobalObject* arg0, ZigString* arg1); +CPP_DECL WebCore__DOMFormData* WebCore__DOMFormData__fromJS(JSC__JSValue JSValue0); + #pragma mark - WebCore::FetchHeaders CPP_DECL void WebCore__FetchHeaders__append(WebCore__FetchHeaders* arg0, const ZigString* arg1, const ZigString* arg2); |