mirror of
https://github.com/cypress-io/cypress.git
synced 2026-01-26 00:49:05 -06:00
* chore: use import type across repo * chore: use import type across repo * chore: use import type across repo * chore: use import type across repo * update exports * update test * update import type * update types * use import type in driver * correctly export function * revert test * remove unrelated code * revert code * improve type imports * override for reporter
31 lines
590 B
TypeScript
31 lines
590 B
TypeScript
import { Http, ServerCtx } from './http'
|
|
import type { BrowserPreRequest } from './types'
|
|
|
|
export class NetworkProxy {
|
|
http: Http
|
|
|
|
constructor (opts: ServerCtx) {
|
|
this.http = new Http(opts)
|
|
}
|
|
|
|
addPendingBrowserPreRequest (preRequest: BrowserPreRequest) {
|
|
this.http.addPendingBrowserPreRequest(preRequest)
|
|
}
|
|
|
|
handleHttpRequest (req, res) {
|
|
this.http.handle(req, res)
|
|
}
|
|
|
|
handleSourceMapRequest (req, res) {
|
|
this.http.handleSourceMapRequest(req, res)
|
|
}
|
|
|
|
setHttpBuffer (buffer) {
|
|
this.http.setBuffer(buffer)
|
|
}
|
|
|
|
reset () {
|
|
this.http.reset()
|
|
}
|
|
}
|