mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-08-18 09:25:14 +02:00
17 lines
531 B
TypeScript
17 lines
531 B
TypeScript
import type { HttpRequest, HttpResponse } from "@yaakapp-internal/models";
|
|
import { getActiveCookieJar } from "../hooks/useActiveCookieJar";
|
|
import { rpc } from "./rpc";
|
|
|
|
export async function sendEphemeralRequest(
|
|
request: HttpRequest,
|
|
environmentId: string | null,
|
|
): Promise<HttpResponse> {
|
|
// Remove some things that we don't want to associate
|
|
const newRequest = { ...request };
|
|
return rpc("cmd_send_ephemeral_request", {
|
|
request: newRequest,
|
|
environmentId,
|
|
cookieJarId: getActiveCookieJar()?.id,
|
|
});
|
|
}
|