mirror of
https://github.com/MercuryWorkshop/adrift.git
synced 2025-05-16 07:30:01 -04:00
it's not done but I'm too scared of losing this work to not commit
This commit is contained in:
parent
636cdbf561
commit
bcaf437fd3
6 changed files with 498 additions and 39 deletions
|
@ -29,11 +29,26 @@ export class AdriftBareClient extends Client {
|
|||
duplex: string | undefined,
|
||||
signal: AbortSignal | undefined
|
||||
): Promise<BareResponse> {
|
||||
let rawResponse = await this.connection.httprequest({ a: "test data" });
|
||||
if (
|
||||
body !== null &&
|
||||
typeof body !== "undefined" &&
|
||||
typeof body !== "string"
|
||||
) {
|
||||
console.log({ body });
|
||||
throw new Error("bare-client-custom passed an unexpected body type");
|
||||
}
|
||||
let rawResponse = await this.connection.httprequest({
|
||||
method,
|
||||
requestHeaders,
|
||||
body,
|
||||
remote,
|
||||
cache,
|
||||
duplex,
|
||||
});
|
||||
|
||||
return new Response(JSON.stringify(rawResponse)) as BareResponse;
|
||||
}
|
||||
async connect(
|
||||
connect(
|
||||
remote: URL,
|
||||
protocols: string[],
|
||||
getRequestHeaders: GetRequestHeadersCallback,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue