Buckets:
ktongue/docker_container / .vscode-server /extensions /formulahendry.code-runner-0.12.2 /node_modules /applicationinsights /AutoCollection /RequestParser.js
| ; | |
| /** | |
| * Base class for helpers that read data from HTTP requst/response objects and convert them | |
| * into the telemetry contract objects. | |
| */ | |
| var RequestParser = (function () { | |
| function RequestParser() { | |
| } | |
| /** | |
| * Gets a url parsed out from request options | |
| */ | |
| RequestParser.prototype.getUrl = function () { | |
| return this.url; | |
| }; | |
| RequestParser.prototype.RequestParser = function () { | |
| this.startTime = +new Date(); | |
| }; | |
| RequestParser.prototype._setStatus = function (status, error, properties) { | |
| var endTime = +new Date(); | |
| this.duration = endTime - this.startTime; | |
| this.statusCode = status; | |
| if (error) { | |
| if (!properties) { | |
| properties = {}; | |
| } | |
| if (typeof error === "string") { | |
| properties["error"] = error; | |
| } | |
| else if (error instanceof Error) { | |
| properties["error"] = error.message; | |
| } | |
| else if (typeof error === "object") { | |
| for (var key in error) { | |
| properties[key] = error[key] && error[key].toString && error[key].toString(); | |
| } | |
| } | |
| } | |
| this.properties = properties; | |
| }; | |
| RequestParser.prototype._isSuccess = function () { | |
| return (0 < this.statusCode) && (this.statusCode < 400); | |
| }; | |
| return RequestParser; | |
| }()); | |
| module.exports = RequestParser; | |
Xet Storage Details
- Size:
- 1.51 kB
- Xet hash:
- 7896ddd639ce3752fb89d226178d981cbffc7b41d35c43ea9bf7c343c388ac8c
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.