mirror of
https://github.com/mountain-loop/yaak.git
synced 2025-12-23 22:48:55 -05:00
17 lines
545 B
TypeScript
17 lines
545 B
TypeScript
import type { HttpRequest, HttpResponse } from '@yaakapp-internal/models';
|
|
import { getActiveCookieJar } from '../hooks/useActiveCookieJar';
|
|
import { invokeCmd } from './tauri';
|
|
|
|
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 invokeCmd('cmd_send_ephemeral_request', {
|
|
request: newRequest,
|
|
environmentId,
|
|
cookieJarId: getActiveCookieJar()?.id,
|
|
});
|
|
}
|