mirror of
https://github.com/cypress-io/cypress.git
synced 2026-02-12 10:10:32 -06:00
31 lines
585 B
TypeScript
31 lines
585 B
TypeScript
import { Http, ServerCtx } from './http'
|
|
import { 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()
|
|
}
|
|
}
|