chore: generate
This commit is contained in:
@@ -1,12 +1,6 @@
|
|||||||
import { ProxyUtil } from "@/server/proxy-util"
|
import { ProxyUtil } from "@/server/proxy-util"
|
||||||
import { Effect, Stream } from "effect"
|
import { Effect, Stream } from "effect"
|
||||||
import {
|
import { HttpBody, HttpClient, HttpClientRequest, HttpServerRequest, HttpServerResponse } from "effect/unstable/http"
|
||||||
HttpBody,
|
|
||||||
HttpClient,
|
|
||||||
HttpClientRequest,
|
|
||||||
HttpServerRequest,
|
|
||||||
HttpServerResponse,
|
|
||||||
} from "effect/unstable/http"
|
|
||||||
import * as Socket from "effect/unstable/socket/Socket"
|
import * as Socket from "effect/unstable/socket/Socket"
|
||||||
|
|
||||||
function webSource(request: HttpServerRequest.HttpServerRequest): Request | undefined {
|
function webSource(request: HttpServerRequest.HttpServerRequest): Request | undefined {
|
||||||
|
|||||||
@@ -82,7 +82,12 @@ describe("HttpApi workspace proxy", () => {
|
|||||||
new Request("http://localhost/session/abc", { method: "POST", body: "request-body" }),
|
new Request("http://localhost/session/abc", { method: "POST", body: "request-body" }),
|
||||||
)
|
)
|
||||||
const httpClient = yield* HttpClient.HttpClient
|
const httpClient = yield* HttpClient.HttpClient
|
||||||
const response = yield* HttpApiProxy.http(httpClient, `${url}/session/abc?keep=yes`, { "x-extra": "injected" }, request)
|
const response = yield* HttpApiProxy.http(
|
||||||
|
httpClient,
|
||||||
|
`${url}/session/abc?keep=yes`,
|
||||||
|
{ "x-extra": "injected" },
|
||||||
|
request,
|
||||||
|
)
|
||||||
|
|
||||||
expect(response.status).toBe(201)
|
expect(response.status).toBe(201)
|
||||||
const client = HttpServerResponse.toClientResponse(response)
|
const client = HttpServerResponse.toClientResponse(response)
|
||||||
|
|||||||
Reference in New Issue
Block a user