UNPKG

@gatling.io/http

Version:

Gatling JS is a JavaScript/TypeScript interface for the [Gatling load testing tool](https://gatling.io/).

47 lines (46 loc) 2.07 kB
"use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.wrapResponse = void 0; const headers_1 = require("../headers"); const body_1 = require("./body"); const status_1 = require("./status"); __exportStar(require("./body"), exports); __exportStar(require("./status"), exports); const wrapResponse = (_underlying) => ({ _underlying, body: () => (0, body_1.wrapResponseBody)(_underlying.body()), //copy: ( // request: Request = wrapRequest(_underlying.request()), // startTimestamp: number = _underlying.startTimestamp(), // endTimestamp: number = _underlying.endTimestamp(), // //status: any /*io.netty.handler.codec.http.HttpResponseStatus*/, // //headers: HttpHeaders, // //body: any /*io.gatling.http.response.ResponseBody*/, // //checksums: any /*scala.collection.immutable.Map*/, // isHttp2: boolean = _underlying.isHttp2() //): Response => wrapResponse(_underlying.copy( // request = request._underlying, // startTimestamp = startTimestamp, // endTimestamp = endTimestamp, // isHttp2 //)), headers: () => (0, headers_1.wrapHttpHeaders)(_underlying.headers()), isHttp2: () => _underlying.isHttp2(), isRedirect: () => _underlying.isRedirect(), status: () => (0, status_1.fromJvmHttpResponseStatus)(_underlying.status()) }); exports.wrapResponse = wrapResponse;