mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-23 00:58:32 +02:00
Refactor desktop app into separate client and proxy apps
This commit is contained in:
16
apps/yaak-client/lib/sendEphemeralRequest.ts
Normal file
16
apps/yaak-client/lib/sendEphemeralRequest.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
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,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user