зеркало из https://github.com/Azure/ms-rest-js.git
Changes based on PR feedback
This commit is contained in:
Родитель
91be3847b4
Коммит
4435bebbd7
|
@ -1 +1 @@
|
|||
{"version":3,"file":"fetchHttpClient.js","sourceRoot":"","sources":["../../lib/fetchHttpClient.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,6CAA4C;AAM5C;;GAEG;AACH,IAAM,KAAK,GAAgB,OAAO,CAAC,gBAAgB,CAAC,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC;AAEhF;;GAEG;AACH;IAAA;IAsBA,CAAC;IArBgB,8BAAI,GAAjB,UAAkB,OAAoB;;;;;;;wBAC5B,mBAAmB,GAAgB;4BACrC,MAAM,EAAE,OAAO,CAAC,UAAU;4BAC1B,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE;4BACjC,IAAI,EAAE,OAAO,CAAC,IAAI;yBACrB,CAAC;wBAE8B,qBAAM,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,mBAAmB,CAAC,EAAA;;wBAAvE,aAAa,GAAa,SAA6C;wBAEvE,eAAe,GAAG,IAAI,yBAAW,EAAE,CAAC;wBACpC,oBAAoB,GAAY,aAAa,CAAC,OAAO,CAAC;wBAC5D,oBAAoB,CAAC,OAAO,CAAC,UAAC,WAAmB,EAAE,UAAkB,IAAO,eAAe,CAAC,GAAG,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;wBAE7H,sBAAO;gCACH,OAAO,EAAE,OAAO;gCAChB,UAAU,EAAE,aAAa,CAAC,MAAM;gCAChC,OAAO,EAAE,eAAe;gCACxB,QAAQ,EAAE;;gDAAY,qBAAM,aAAa,CAAC,IAAI,EAAE,EAAA;gDAA1B,sBAAA,SAA0B,EAAA;;yCAAA;gCAChD,gBAAgB,EAAE;;gDAAY,qBAAM,aAAa,CAAC,IAAI,EAAE,EAAA;gDAA1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QACE,IAAM,MAAM,GAAmB,EAAE,CAAC;QAElC,IAAM,OAAO,GAAiB,IAAI,CAAC,YAAY,EAAE,CAAC;QAClD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE;YACvC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;SAC5C;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;OAEG;IACI,2BAAK,GAAZ;QACE,OAAO,IAAI,WAAW,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;IAC5C,CAAC;IACH,kBAAC;AAAD,CAAC,AAnGD,IAmGC;AAnGY,kCAAW"}
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"httpMethod.js","sourceRoot":"","sources":["../../lib/httpMethod.ts"],"names":[],"mappings":";AAAA,4DAA4D;AAC5D,+FAA+F;;AAE/F;;GAEG;AACH,IAAY,UASX;AATD,WAAY,UAAU;IAClB,yBAAW,CAAA;IACX,yBAAW,CAAA;IACX,2BAAa,CAAA;IACb,+BAAiB,CAAA;IACjB,6BAAe,CAAA;IACf,2BAAa,CAAA;IACb,iCAAmB,CAAA;IACnB,6BAAe,CAAA;AACnB,CAAC,EATW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QASrB"}
|
||||
{"version":3,"file":"httpMethod.js","sourceRoot":"","sources":["../../lib/httpMethod.ts"],"names":[],"mappings":";AAAA,4DAA4D;AAC5D,+FAA+F;;AAE/F;;GAEG;AACH,IAAY,UASX;AATD,WAAY,UAAU;IACpB,yBAAW,CAAA;IACX,yBAAW,CAAA;IACX,2BAAa,CAAA;IACb,+BAAiB,CAAA;IACjB,6BAAe,CAAA;IACf,2BAAa,CAAA;IACb,iCAAmB,CAAA;IACnB,6BAAe,CAAA;AACjB,CAAC,EATW,UAAU,GAAV,kBAAU,KAAV,kBAA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CAAC,MAAM,CAAC;YACjF,KAAK,IAAI,CAAC,GAAG,4BAA4B,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,EAAE;gBAC1D,IAAM,oBAAoB,GAAyB,IAAI,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC;gBACnF,sBAAsB,GAAG,oBAAoB,CAAC,sBAAsB,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAC;aACnG;SACF;QACD,OAAO,sBAAsB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC9C,CAAC;IACH,mBAAC;AAAD,CAAC,AAjCD,IAiCC;AAjCY,oCAAY"}
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"httpPipelineLogLevel.js","sourceRoot":"","sources":["../../lib/httpPipelineLogLevel.ts"],"names":[],"mappings":";AAAA,4DAA4D;AAC5D,+FAA+F;;AAE/F;;GAEG;AACH,IAAY,oBAoBX;AApBD,WAAY,oBAAoB;IAC5B;;OAEG;IACH,6DAAG,CAAA;IAEH;;OAEG;IACH,iEAAK,CAAA;IAEL;;OAEG;IACH,qEAAO,CAAA;IAEP;;OAEG;IACH,+DAAI,CAAA;AACR,CAAC,EApBW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAoB/B"}
|
||||
{"version":3,"file":"httpPipelineLogLevel.js","sourceRoot":"","sources":["../../lib/httpPipelineLogLevel.ts"],"names":[],"mappings":";AAAA,4DAA4D;AAC5D,+FAA+F;;AAE/F;;GAEG;AACH,IAAY,oBAoBX;AApBD,WAAY,oBAAoB;IAC9B;;OAEG;IACH,6DAAG,CAAA;IAEH;;OAEG;IACH,iEAAK,CAAA;IAEL;;OAEG;IACH,qEAAO,CAAA;IAEP;;OAEG;IACH,+DAAI,CAAA;AACN,CAAC,EApBW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAoB/B"}
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"httpPipelineLogger.js","sourceRoot":"","sources":["../../lib/httpPipelineLogger.ts"],"names":[],"mappings":";AAAA,4DAA4D;AAC5D,+FAA+F;;AAE/F,+DAA8D;AAuB9D;;GAEG;AACH;IACI;;;OAGG;IACH,mCAAmB,eAAqC;QAArC,oBAAe,GAAf,eAAe,CAAsB;IACxD,CAAC;IAED;;;;;;OAMG;IACH,uCAAG,GAAH,UAAI,QAA8B,EAAE,OAAe;QAC/C,OAAO,CAAC,GAAG,CAAI,2CAAoB,CAAC,QAAQ,CAAC,UAAK,OAAS,CAAC,CAAC;IACjE,CAAC;IACL,gCAAC;AAAD,CAAC,AAlBD,IAkBC;AAlBY,8DAAyB"}
|
||||
{"version":3,"file":"httpPipelineLogger.js","sourceRoot":"","sources":["../../lib/httpPipelineLogger.ts"],"names":[],"mappings":";AAAA,4DAA4D;AAC5D,+FAA+F;;AAE/F,+DAA8D;AAuB9D;;GAEG;AACH;IACE;;;OAGG;IACH,mCAAmB,eAAqC;QAArC,oBAAe,GAAf,eAAe,CAAsB;IACxD,CAAC;IAED;;;;;;OAMG;IACH,uCAAG,GAAH,UAAI,QAA8B,EAAE,OAAe;QACjD,OAAO,CAAC,GAAG,CAAI,2CAAoB,CAAC,QAAQ,CAAC,UAAK,OAAS,CAAC,CAAC;IAC/D,CAAC;IACH,gCAAC;AAAD,CAAC,AAlBD,IAkBC;AAlBY,8DAAyB"}
|
|
@ -9,7 +9,7 @@ var httpHeaders_1 = require("./httpHeaders");
|
|||
var HttpRequest = /** @class */ (function () {
|
||||
/**
|
||||
* Create a new HTTP request using the provided properties.
|
||||
* @param _httpMethod The HTTP method that will be used to send this request.
|
||||
* @param httpMethod The HTTP method that will be used to send this request.
|
||||
* @param url The URL that this request will be sent to.
|
||||
* @param headers The HTTP headers to include in this request.
|
||||
* @param _body The body of this HTTP request.
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"httpRequest.js","sourceRoot":"","sources":["../../lib/httpRequest.ts"],"names":[],"mappings":";;AAAA,4DAA4D;AAC5D,+FAA+F;AAC/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AAiD;QACjD,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC;QAEpE,uCAAuC;QACvC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,iCAAiC,CAAC,CAAC;IACzE,CAAC;IACH,2BAAC;AAAD,CAAC,AAlJD,CAAmC,iCAAiB,GAkJnD"}
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"signingPolicy.js","sourceRoot":"","sources":["../../../lib/policies/signingPolicy.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,kDAAoE;AAIpE;;;GAGG;AACH,uBAA8B,sBAAgD;IAC1E,OAAO,UAAC,UAAyB,EAAE,OAA6B;QAC5D,OAAO,IAAI,aAAa,CAAC,sBAAsB,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IAC1E,CAAC,CAAC;AACN,CAAC;AAJD,sCAIC;AAED;IAA4B,iCAAiB;IACzC,uBAA6B,uBAAiD,EAAE,UAAyB,EAAE,OAA6B;QAAxI,YACI,kBAAM,UAAU,EAAE,OAAO,CAAC,SAC7B;QAF4B,6BAAuB,GAAvB,uBAAuB,CAA0B;;IAE9E,CAAC;IAEY,4BAAI,GAAjB,UAAkB,OAAoB;;;;;4BACC,qBAAM,IAAI,CAAC,uBAAuB,CAAC,eAAe,CAAC,OAAO,CAAC,EAAA;;wBAAxF,aAAa,GAAgB,SAA2D;wBACvF,qBAAM,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,aAAa,CAAC,EAAA;4BAAjD,sBAAO,SAA0C,EAAC;;;;KACrD;IACL,oBAAC;AAAD,CAAC,AATD,CAA4B,iCAAiB,GAS5C"}
|
||||
{"version":3,"file":"signingPolicy.js","sourceRoot":"","sources":["../../../lib/policies/signingPolicy.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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ACf,MAAM;aACT;SACF;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IACH,6BAAC;AAAD,CAAC,AA1BD,CAAqC,+CAAsB,GA0B1D"}
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"userAgentPolicy.js","sourceRoot":"","sources":["../../../lib/policies/userAgentPolicy.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4DAA4D;AAC5D,+FAA+F;AAC/F,gEAA+D;AAG/D,kDAAoE;AAGpE,+CAA8C;AAE9C;;;GAGG;AACH,yBAAgC,SAAiB;IAC7C,OAAO,UAAC,UAAyB,EAAE,OAA6B;QAC5D,OAAO,IAAI,eAAe,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC,CAAC;AACN,CAAC;AAJD,0CAIC;AAED;IAA8B,mCAAiB;IAC3C,yBAA6B,UAAkB,EAAE,UAAyB,EAAE,OAA6B;QAAzG,YACI,kBAAM,UAAU,EAAE,OAAO,CAAC,SAC7B;QAF4B,gBAAU,GAAV,UAAU,CAAQ;;IAE/C,CAAC;IAED,8BAAI,GAAJ,UAAK,OAAoB;QACrB,IAAI,IAAI,CAAC,SAAS,CAAC,2CAAoB,CAAC,IAAI,CAAC,EAAE;YAC3C,IAAI,CAAC,GAAG,CAAC,2CAAoB,CAAC,IAAI,EAAE,WAAQ,qBAAS,CAAC,eAAe,CAAC,UAAU,uBAAgB,IAAI,CAAC,UAAU,QAAI,CAAC,CAAC;SACxH;QACD,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAS,CAAC,eAAe,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QAC3E,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC1C,CAAC;IACL,sBAAC;AAAD,CAAC,AAZD,CAA8B,iCAAiB,GAY9C"}
|
||||
{"version":3,"file":"userAgentPolicy.js","sourceRoot":"","sources":["../../../lib/policies/userAgentPolicy.ts"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G;IACO,qCAAS,GAAnB,UAAoB,QAA8B;QAC9C,OAAO,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IAC7C,CAAC;IAED;;;;;OAKG;IACO,+BAAG,GAAb,UAAc,QAA8B,EAAE,OAAe;QACzD,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACzC,CAAC;IACL,wBAAC;AAAD,CAAC,AAxBD,IAwBC;AAxBqB,8CAAiB"}
|
||||
{"version":3,"file":"requestPolicy.js","sourceRoot":"","sources":["../../lib/requestPolicy.ts"],"names":[],"mappings":";AAAA,4DAA4D;AAC5D,+FAA+F;;AAoB/F;;GAEG;AACH;IACE,2BAA+B,WAA0B,EAAmB,QAA8B;QAA3E,gBAAW,GAAX,WAAW,CAAe;QAAmB,aAAQ,GAAR,QAAQ,CAAsB;IAC1G,CAAC;IAID;;;;OAIG;IACO,qCAAS,GAAnB,UAAoB,QAA8B;QAChD,OAAO,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IAC3C,CAAC;IAED;;;;;OAKG;IACO,+BAAG,GAAb,UAAc,QAA8B,EAAE,OAAe;QAC3D,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACvC,CAAC;IACH,wBAAC;AAAD,CAAC,AAxBD,IAwBC;AAxBqB,8CAAiB"}
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"requestPolicyOptions.js","sourceRoot":"","sources":["../../lib/requestPolicyOptions.ts"],"names":[],"mappings":";AAAA,4DAA4D;AAC5D,+FAA+F;;AAG/F,+DAA8D;AAE9D;;GAEG;AACH;IACI,8BAAoB,OAA4B;QAA5B,YAAO,GAAP,OAAO,CAAqB;IAChD,CAAC;IAED;;;;OAIG;IACI,wCAAS,GAAhB,UAAiB,QAA8B;QAC3C,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO;YACjB,QAAQ,KAAK,2CAAoB,CAAC,GAAG;YACrC,QAAQ,IAAI,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC;IACjD,CAAC;IAED;;;;;OAKG;IACI,kCAAG,GAAV,UAAW,QAA8B,EAAE,OAAe;QACtD,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE;YAC1C,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;SACvC;IACL,CAAC;IACL,2BAAC;AAAD,CAAC,AA1BD,IA0BC;AA1BY,oDAAoB"}
|
||||
{"version":3,"file":"requestPolicyOptions.js","sourceRoot":"","sources":["../../lib/requestPolicyOptions.ts"],"names":[],"mappings":";AAAA,4DAA4D;AAC5D,+FAA+F;;AAG/F,+DAA8D;AAE9D;;GAEG;AACH;IACE,8BAAoB,OAA4B;QAA5B,YAAO,GAAP,OAAO,CAAqB;IAChD,CAAC;IAED;;;;OAIG;IACI,wCAAS,GAAhB,UAAiB,QAA8B;QAC7C,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO;YACnB,QAAQ,KAAK,2CAAoB,CAAC,GAAG;YACrC,QAAQ,IAAI,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC;IAC7C,CAAC;IAED;;;;;OAKG;IACI,kCAAG,GAAV,UAAW,QAA8B,EAAE,OAAe;QACxD,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE;YAC5C,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;SACrC;IACH,CAAC;IACH,2BAAC;AAAD,CAAC,AA1BD,IA0BC;AA1BY,oDAAoB"}
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"fakeHttpClient.js","sourceRoot":"","sources":["../../test/fakeHttpClient.ts"],"names":[],"mappings":";;AAMA;;;;GAIG;AACH;IACI,wBAA6B,YAA6D;QAA7D,iBAAY,GAAZ,YAAY,CAAiD;IAC1F,CAAC;IAED;;;;OAIG;IACI,6BAAI,GAAX,UAAY,OAAoB;QAC5B,OAAO,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;IACtC,CAAC;IACL,qBAAC;AAAD,CAAC,AAZD,IAYC;AAZY,wCAAc"}
|
||||
{"version":3,"file":"fakeHttpClient.js","sourceRoot":"","sources":["../../test/fakeHttpClient.ts"],"names":[],"mappings":";;AAMA;;;;GAIG;AACH;IACE,wBAA6B,YAA6D;QAA7D,iBAAY,GAAZ,YAAY,CAAiD;IAC1F,CAAC;IAED;;;;OAIG;IACI,6BAAI,GAAX,UAAY,OAAoB;QAC9B,OAAO,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC;IACH,qBAAC;AAAD,CAAC,AAZD,IAYC;AAZY,wCAAc"}
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"fetchHttpClientTests.js","sourceRoot":"","sources":["../../test/fetchHttpClientTests.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,iBAwGG;;AA1GH,4DAA4D;AAC5D,+FAA+F;AAC/F,+BAAiC;AACjC,0DAAyD;AACzD,gDAA+C;AAC/C,kDAAiD;AAGjD,QAAQ,CAAC,iBAAiB,EAAE;IACxB,EAAE,CAAC,2BAA2B,EAAE;;;;;oBACtB,OAAO,GAAG,IAAI,yBAAW,CAAC,uBAAU,CAAC,GAAG,EAAE,wBAAwB,EAAE,EAAE,CAAC,CAAC;oBACxE,UAAU,GAAG,IAAI,iCAAe,EAAE,CAAC;oBAEV,qBAAM,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,EAAA;;oBAAvD,QAAQ,GAAiB,SAA8B;oBAC7D,MAAM,CAAC,eAAe,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;oBAClD,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,UAAU,EAAE,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,CAAC,GAAG,CAAC,2CAAoB,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;QACpD,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC,IAAI,EAAE;YAClC,iBAAiB;YACjB,oBAAoB;YACpB,kBAAkB;SACnB,CAAC,CAAC;QAEH,MAAM,CAAC,GAAG,CAAC,2CAAoB,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;QAClD,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC,IAAI,EAAE;YAClC,iBAAiB;YACjB,oBAAoB;YACpB,kBAAkB;YAClB,gBAAgB;SACjB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mCAAmC,EAAE;QACtC,IAAM,MAAM,GAAG,IAAI,uDAA0B,EAAE,CAAC;QAChD,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,eAAe,EAAE,2CAAoB,CAAC,IAAI,CAAC,CAAC;QAEtE,MAAM,CAAC,eAAe,GAAG,2CAAoB,CAAC,GAAG,CAAC;QAClD,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,eAAe,EAAE,2CAAoB,CAAC,GAAG,CAAC,CAAC;QAErE,MAAM,CAAC,eAAe,GAAG,2CAAoB,CAAC,KAAK,CAAC;QACpD,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,eAAe,EAAE,2CAAoB,CAAC,KAAK,CAAC,CAAC;IACzE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"exponentialRetryPolicyTests.js","sourceRoot":"","sources":["../../../test/policies/exponentialRetryPolicyTests.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,iBAgEG;;AAlEH,4DAA4D;AAC5D,+FAA+F;AAC/F,+BAAiC;AACjC,mDAAkD;AAClD,qDAAoD;AAEpD,uEAAsE;AACtE,oFAAmF;AAGnF,uEAAsE;AAEtE,QAAQ,CAAC,wBA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E;AAGrE,uEAAsE;AAEtE,QAAQ,CAAC,iBAAiB,EAAE;IAC1B,EAAE,CAAC,2EAA2E,EAAE;;;;;oBACxE,aAAa,GAAyB,iCAAe,CAAC,sBAAsB,CAAC,CAAC;oBAE9E,UAAU,GAAkB;wBAChC,IAAI,EAAE,UAAC,OAAoB;4BACzB,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,2CAAoB,CAAC,OAAO,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC;wBACrE,CAAC;qBACF,CAAC;oBAEI,MAAM,GAAkB,aAAa,CAAC,UAAU,EAAE,IAAI,2CAAoB,EAAE,CAAC,CAAC;oBAC9E,OAAO,GAAG,IAAI,yBAAW,CAAC,uBAAU,CAAC,GAAG,EAAE,kBAAkB,EAAE,EAAE,CAAC,CAAC;oBACzC,qBAAM,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAA;;oBAAnD,QAAQ,GAAiB,SAA0B;oBAEzD,MAAM,CAAC,eAAe,CAAC,OAAO,EAAE,IAAI,yBAAW,CAAC,uBAAU,CAAC,GAAG,EAAE,kBAAkB,EAAE,EAAE,YAAY,EAAE,sBAAsB,EAAE,CAAC,CAAC,CAAC;oBAC/H,MAAM,CAAC,eAAe,CAAC,QAAQ,CAAC,OAAO,EAAE,IAAI,yBAAW,CAAC,uBAAU,CAAC,GAAG,EAAE,kBAAkB,EAAE,EAAE,YAAY,EAAE,sBAAsB,EAAE,CAAC,CAAC,CAAC;;;;SACzI,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -16,25 +16,25 @@ const fetch: FetchMethod = require("fetch-ponyfill")({ useCookie: true }).fetch;
|
|||
* A HttpClient implementation that uses fetch to send HTTP requests.
|
||||
*/
|
||||
export class FetchHttpClient implements HttpClient {
|
||||
public async send(request: HttpRequest): Promise<HttpResponse> {
|
||||
const fetchRequestOptions: RequestInit = {
|
||||
method: request.httpMethod,
|
||||
headers: request.headers.toJson(),
|
||||
body: request.body
|
||||
};
|
||||
public async send(request: HttpRequest): Promise<HttpResponse> {
|
||||
const fetchRequestOptions: RequestInit = {
|
||||
method: request.httpMethod,
|
||||
headers: request.headers.toJson(),
|
||||
body: request.body
|
||||
};
|
||||
|
||||
const fetchResponse: Response = await fetch(request.url, fetchRequestOptions);
|
||||
const fetchResponse: Response = await fetch(request.url, fetchRequestOptions);
|
||||
|
||||
const responseHeaders = new HttpHeaders();
|
||||
const fetchResponseHeaders: Headers = fetchResponse.headers;
|
||||
fetchResponseHeaders.forEach((headerValue: string, headerName: string) => { responseHeaders.set(headerName, headerValue); });
|
||||
const responseHeaders = new HttpHeaders();
|
||||
const fetchResponseHeaders: Headers = fetchResponse.headers;
|
||||
fetchResponseHeaders.forEach((headerValue: string, headerName: string) => { responseHeaders.set(headerName, headerValue); });
|
||||
|
||||
return {
|
||||
request: request,
|
||||
statusCode: fetchResponse.status,
|
||||
headers: responseHeaders,
|
||||
textBody: async () => await fetchResponse.text(),
|
||||
deserializedBody: async () => await fetchResponse.json()
|
||||
};
|
||||
}
|
||||
return {
|
||||
request: request,
|
||||
statusCode: fetchResponse.status,
|
||||
headers: responseHeaders,
|
||||
textBody: async () => await fetchResponse.text(),
|
||||
deserializedBody: async () => await fetchResponse.json()
|
||||
};
|
||||
}
|
||||
}
|
|
@ -5,22 +5,22 @@
|
|||
* A collection of HttpHeaders that can be sent with a HTTP request.
|
||||
*/
|
||||
function getHeaderKey(headerName: string) {
|
||||
return headerName.toLowerCase();
|
||||
return headerName.toLowerCase();
|
||||
}
|
||||
|
||||
/**
|
||||
* An individual header within a HttpHeaders collection.
|
||||
*/
|
||||
export interface HttpHeader {
|
||||
/**
|
||||
* The name of the header.
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* The name of the header.
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* The value of the header.
|
||||
*/
|
||||
value: string;
|
||||
/**
|
||||
* The value of the header.
|
||||
*/
|
||||
value: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -32,102 +32,102 @@ export type RawHttpHeaders = { [headerName: string]: string };
|
|||
* A collection of HTTP header key/value pairs.
|
||||
*/
|
||||
export class HttpHeaders {
|
||||
private readonly _headersMap: { [headerKey: string]: HttpHeader };
|
||||
private readonly _headersMap: { [headerKey: string]: HttpHeader };
|
||||
|
||||
constructor(rawHeaders?: RawHttpHeaders) {
|
||||
this._headersMap = {};
|
||||
if (rawHeaders) {
|
||||
for (const headerName in rawHeaders) {
|
||||
this.set(headerName, rawHeaders[headerName]);
|
||||
}
|
||||
}
|
||||
constructor(rawHeaders?: RawHttpHeaders) {
|
||||
this._headersMap = {};
|
||||
if (rawHeaders) {
|
||||
for (const headerName in rawHeaders) {
|
||||
this.set(headerName, rawHeaders[headerName]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a header in this collection with the provided name and value. The name is
|
||||
* case-insensitive.
|
||||
* @param headerName The name of the header to set. This value is case-insensitive.
|
||||
* @param headerValue The value of the header to set.
|
||||
*/
|
||||
public set(headerName: string, headerValue: string | number): void {
|
||||
this._headersMap[getHeaderKey(headerName)] = { name: headerName, value: headerValue.toString() };
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the header value for the provided header name, or undefined if no header exists in this
|
||||
* collection with the provided name.
|
||||
* @param headerName The name of the header.
|
||||
*/
|
||||
public get(headerName: string): string | undefined {
|
||||
const header: HttpHeader = this._headersMap[getHeaderKey(headerName)];
|
||||
return !header ? undefined : header.value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the headers that are contained this collection as an object.
|
||||
*/
|
||||
public rawHeaders(): RawHttpHeaders {
|
||||
const result: RawHttpHeaders = {};
|
||||
for (const headerKey in this._headersMap) {
|
||||
const header: HttpHeader = this._headersMap[headerKey];
|
||||
result[header.name] = header.value;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the headers that are contained in this collection as an array.
|
||||
*/
|
||||
public headersArray(): HttpHeader[] {
|
||||
const headers: HttpHeader[] = [];
|
||||
for (const headerKey in this._headersMap) {
|
||||
headers.push(this._headersMap[headerKey]);
|
||||
}
|
||||
return headers;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the header names that are contained in this collection.
|
||||
*/
|
||||
public headerNames(): string[] {
|
||||
const headerNames: string[] = [];
|
||||
const headers: HttpHeader[] = this.headersArray();
|
||||
for (let i = 0; i < headers.length; ++i) {
|
||||
headerNames.push(headers[i].name);
|
||||
}
|
||||
return headerNames;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the header names that are contained in this collection.
|
||||
*/
|
||||
public headerValues(): string[] {
|
||||
const headerValues: string[] = [];
|
||||
const headers: HttpHeader[] = this.headersArray();
|
||||
for (let i = 0; i < headers.length; ++i) {
|
||||
headerValues.push(headers[i].value);
|
||||
}
|
||||
return headerValues;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the JSON object representation of this HTTP header collection.
|
||||
*/
|
||||
public toJson(): RawHttpHeaders {
|
||||
const result: RawHttpHeaders = {};
|
||||
|
||||
const headers: HttpHeader[] = this.headersArray();
|
||||
for (let i = 0; i < headers.length; ++i) {
|
||||
result[headers[i].name] = headers[i].value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a header in this collection with the provided name and value. The name is
|
||||
* case-insensitive.
|
||||
* @param headerName The name of the header to set. This value is case-insensitive.
|
||||
* @param headerValue The value of the header to set.
|
||||
*/
|
||||
public set(headerName: string, headerValue: string | number): void {
|
||||
this._headersMap[getHeaderKey(headerName)] = { name: headerName, value: headerValue.toString() };
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the header value for the provided header name, or undefined if no header exists in this
|
||||
* collection with the provided name.
|
||||
* @param headerName The name of the header.
|
||||
*/
|
||||
public get(headerName: string): string | undefined {
|
||||
const header: HttpHeader = this._headersMap[getHeaderKey(headerName)];
|
||||
return !header ? undefined : header.value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the headers that are contained this collection as an object.
|
||||
*/
|
||||
public rawHeaders(): RawHttpHeaders {
|
||||
const result: RawHttpHeaders = {};
|
||||
for (const headerKey in this._headersMap) {
|
||||
const header: HttpHeader = this._headersMap[headerKey];
|
||||
result[header.name] = header.value;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the headers that are contained in this collection as an array.
|
||||
*/
|
||||
public headersArray(): HttpHeader[] {
|
||||
const headers: HttpHeader[] = [];
|
||||
for (const headerKey in this._headersMap) {
|
||||
headers.push(this._headersMap[headerKey]);
|
||||
}
|
||||
return headers;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the header names that are contained in this collection.
|
||||
*/
|
||||
public headerNames(): string[] {
|
||||
const headerNames: string[] = [];
|
||||
const headers: HttpHeader[] = this.headersArray();
|
||||
for (let i = 0; i < headers.length; ++i) {
|
||||
headerNames.push(headers[i].name);
|
||||
}
|
||||
return headerNames;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the header names that are contained in this collection.
|
||||
*/
|
||||
public headerValues(): string[] {
|
||||
const headerValues: string[] = [];
|
||||
const headers: HttpHeader[] = this.headersArray();
|
||||
for (let i = 0; i < headers.length; ++i) {
|
||||
headerValues.push(headers[i].value);
|
||||
}
|
||||
return headerValues;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the JSON object representation of this HTTP header collection.
|
||||
*/
|
||||
public toJson(): RawHttpHeaders {
|
||||
const result: RawHttpHeaders = {};
|
||||
|
||||
const headers: HttpHeader[] = this.headersArray();
|
||||
for (let i = 0; i < headers.length; ++i) {
|
||||
result[headers[i].name] = headers[i].value;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a deep clone/copy of this HttpHeaders collection.
|
||||
*/
|
||||
public clone(): HttpHeaders {
|
||||
return new HttpHeaders(this.rawHeaders());
|
||||
}
|
||||
/**
|
||||
* Create a deep clone/copy of this HttpHeaders collection.
|
||||
*/
|
||||
public clone(): HttpHeaders {
|
||||
return new HttpHeaders(this.rawHeaders());
|
||||
}
|
||||
}
|
|
@ -5,12 +5,12 @@
|
|||
* The different HttpMethods that can be associated with a HttpRequest.
|
||||
*/
|
||||
export enum HttpMethod {
|
||||
GET = "GET",
|
||||
PUT = "PUT",
|
||||
POST = "POST",
|
||||
DELETE = "DELETE",
|
||||
PATCH = "PATCH",
|
||||
HEAD = "HEAD",
|
||||
OPTIONS = "OPTIONS",
|
||||
TRACE = "TRACE"
|
||||
GET = "GET",
|
||||
PUT = "PUT",
|
||||
POST = "POST",
|
||||
DELETE = "DELETE",
|
||||
PATCH = "PATCH",
|
||||
HEAD = "HEAD",
|
||||
OPTIONS = "OPTIONS",
|
||||
TRACE = "TRACE"
|
||||
}
|
|
@ -12,10 +12,10 @@ import { RequestPolicyOptions } from "./requestPolicyOptions";
|
|||
let defaultHttpClient: HttpClient;
|
||||
|
||||
function getDefaultHttpClient(): HttpClient {
|
||||
if (!defaultHttpClient) {
|
||||
defaultHttpClient = new FetchHttpClient();
|
||||
}
|
||||
return defaultHttpClient;
|
||||
if (!defaultHttpClient) {
|
||||
defaultHttpClient = new FetchHttpClient();
|
||||
}
|
||||
return defaultHttpClient;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -23,36 +23,36 @@ function getDefaultHttpClient(): HttpClient {
|
|||
* be applied to a HTTP response when it is received.
|
||||
*/
|
||||
export class HttpPipeline {
|
||||
private readonly _httpClient: HttpClient;
|
||||
private readonly _requestPolicyOptions: RequestPolicyOptions;
|
||||
private readonly _httpClient: HttpClient;
|
||||
private readonly _requestPolicyOptions: RequestPolicyOptions;
|
||||
|
||||
constructor(private readonly _requestPolicyFactories: RequestPolicyFactory[], private readonly _httpPipelineOptions: HttpPipelineOptions) {
|
||||
if (!this._httpPipelineOptions) {
|
||||
this._httpPipelineOptions = {};
|
||||
}
|
||||
|
||||
if (!this._httpPipelineOptions.httpClient) {
|
||||
this._httpPipelineOptions.httpClient = getDefaultHttpClient();
|
||||
}
|
||||
|
||||
this._httpClient = this._httpPipelineOptions.httpClient;
|
||||
this._requestPolicyOptions = new RequestPolicyOptions(this._httpPipelineOptions.pipelineLogger);
|
||||
constructor(private readonly _requestPolicyFactories: RequestPolicyFactory[], private readonly _httpPipelineOptions: HttpPipelineOptions) {
|
||||
if (!this._httpPipelineOptions) {
|
||||
this._httpPipelineOptions = {};
|
||||
}
|
||||
|
||||
/**
|
||||
* Send the provided HttpRequest request.
|
||||
* @param request The HTTP request to send.
|
||||
* @return A Promise that resolves to the HttpResponse from the targeted server.
|
||||
*/
|
||||
public send(request: HttpRequest): Promise<HttpResponse> {
|
||||
let requestPolicyChainHead: RequestPolicy = this._httpClient;
|
||||
if (this._requestPolicyFactories) {
|
||||
const requestPolicyFactoriesLength: number = this._requestPolicyFactories.length;
|
||||
for (let i = requestPolicyFactoriesLength - 1; i >= 0; --i) {
|
||||
const requestPolicyFactory: RequestPolicyFactory = this._requestPolicyFactories[i];
|
||||
requestPolicyChainHead = requestPolicyFactory(requestPolicyChainHead, this._requestPolicyOptions);
|
||||
}
|
||||
}
|
||||
return requestPolicyChainHead.send(request);
|
||||
if (!this._httpPipelineOptions.httpClient) {
|
||||
this._httpPipelineOptions.httpClient = getDefaultHttpClient();
|
||||
}
|
||||
|
||||
this._httpClient = this._httpPipelineOptions.httpClient;
|
||||
this._requestPolicyOptions = new RequestPolicyOptions(this._httpPipelineOptions.pipelineLogger);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send the provided HttpRequest request.
|
||||
* @param request The HTTP request to send.
|
||||
* @return A Promise that resolves to the HttpResponse from the targeted server.
|
||||
*/
|
||||
public send(request: HttpRequest): Promise<HttpResponse> {
|
||||
let requestPolicyChainHead: RequestPolicy = this._httpClient;
|
||||
if (this._requestPolicyFactories) {
|
||||
const requestPolicyFactoriesLength: number = this._requestPolicyFactories.length;
|
||||
for (let i = requestPolicyFactoriesLength - 1; i >= 0; --i) {
|
||||
const requestPolicyFactory: RequestPolicyFactory = this._requestPolicyFactories[i];
|
||||
requestPolicyChainHead = requestPolicyFactory(requestPolicyChainHead, this._requestPolicyOptions);
|
||||
}
|
||||
}
|
||||
return requestPolicyChainHead.send(request);
|
||||
}
|
||||
}
|
|
@ -5,23 +5,23 @@
|
|||
* The different levels of logs that can be used with the HttpPipelineLogger.
|
||||
*/
|
||||
export enum HttpPipelineLogLevel {
|
||||
/**
|
||||
* A log level that indicates that no logs will be logged.
|
||||
*/
|
||||
OFF,
|
||||
/**
|
||||
* A log level that indicates that no logs will be logged.
|
||||
*/
|
||||
OFF,
|
||||
|
||||
/**
|
||||
* An error log.
|
||||
*/
|
||||
ERROR,
|
||||
/**
|
||||
* An error log.
|
||||
*/
|
||||
ERROR,
|
||||
|
||||
/**
|
||||
* A warning log.
|
||||
*/
|
||||
WARNING,
|
||||
/**
|
||||
* A warning log.
|
||||
*/
|
||||
WARNING,
|
||||
|
||||
/**
|
||||
* An information log.
|
||||
*/
|
||||
INFO
|
||||
/**
|
||||
* An information log.
|
||||
*/
|
||||
INFO
|
||||
}
|
|
@ -8,41 +8,41 @@ import { HttpPipelineLogLevel } from "./httpPipelineLogLevel";
|
|||
* that can be used for debugging purposes.
|
||||
*/
|
||||
export interface HttpPipelineLogger {
|
||||
/**
|
||||
* The log level threshold for what logs will be logged.
|
||||
* @return The log level threshold for what logs will be logged.
|
||||
*/
|
||||
minimumLogLevel: HttpPipelineLogLevel;
|
||||
/**
|
||||
* The log level threshold for what logs will be logged.
|
||||
* @return The log level threshold for what logs will be logged.
|
||||
*/
|
||||
minimumLogLevel: HttpPipelineLogLevel;
|
||||
|
||||
/**
|
||||
* Log the provided message.
|
||||
* @param logLevel The HttpLogDetailLevel associated with this message.
|
||||
* @param message The message to log.
|
||||
* @param formattedArguments A variadic list of arguments that should be formatted into the
|
||||
* provided message.
|
||||
*/
|
||||
log(logLevel: HttpPipelineLogLevel, message: string): void;
|
||||
/**
|
||||
* Log the provided message.
|
||||
* @param logLevel The HttpLogDetailLevel associated with this message.
|
||||
* @param message The message to log.
|
||||
* @param formattedArguments A variadic list of arguments that should be formatted into the
|
||||
* provided message.
|
||||
*/
|
||||
log(logLevel: HttpPipelineLogLevel, message: string): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* A HttpPipelineLogger that will send its logs to the console.
|
||||
*/
|
||||
export class ConsoleHttpPipelineLogger implements HttpPipelineLogger {
|
||||
/**
|
||||
* Create a new ConsoleHttpPipelineLogger.
|
||||
* @param minimumLogLevel The log level threshold for what logs will be logged.
|
||||
*/
|
||||
constructor(public minimumLogLevel: HttpPipelineLogLevel) {
|
||||
}
|
||||
/**
|
||||
* Create a new ConsoleHttpPipelineLogger.
|
||||
* @param minimumLogLevel The log level threshold for what logs will be logged.
|
||||
*/
|
||||
constructor(public minimumLogLevel: HttpPipelineLogLevel) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Log the provided message.
|
||||
* @param logLevel The HttpLogDetailLevel associated with this message.
|
||||
* @param message The message to log.
|
||||
* @param formattedArguments A variadic list of arguments that should be formatted into the
|
||||
* provided message.
|
||||
*/
|
||||
log(logLevel: HttpPipelineLogLevel, message: string): void {
|
||||
console.log(`${HttpPipelineLogLevel[logLevel]}: ${message}`);
|
||||
}
|
||||
/**
|
||||
* Log the provided message.
|
||||
* @param logLevel The HttpLogDetailLevel associated with this message.
|
||||
* @param message The message to log.
|
||||
* @param formattedArguments A variadic list of arguments that should be formatted into the
|
||||
* provided message.
|
||||
*/
|
||||
log(logLevel: HttpPipelineLogLevel, message: string): void {
|
||||
console.log(`${HttpPipelineLogLevel[logLevel]}: ${message}`);
|
||||
}
|
||||
}
|
|
@ -8,14 +8,14 @@ import { HttpPipelineLogger } from "./httpPipelineLogger";
|
|||
* A set of optional arguments that can be passed to a HttpPipeline.
|
||||
*/
|
||||
export interface HttpPipelineOptions {
|
||||
/**
|
||||
* The HttpClient that will be used for the created HttpPipeline. If no HttpClient is provided
|
||||
* here, then a default HttpClient implementation will be used.
|
||||
*/
|
||||
httpClient?: HttpClient;
|
||||
/**
|
||||
* The HttpClient that will be used for the created HttpPipeline. If no HttpClient is provided
|
||||
* here, then a default HttpClient implementation will be used.
|
||||
*/
|
||||
httpClient?: HttpClient;
|
||||
|
||||
/**
|
||||
* The Logger that will be used for each RequestPolicy within the created HttpPipeline.
|
||||
*/
|
||||
pipelineLogger?: HttpPipelineLogger;
|
||||
/**
|
||||
* The Logger that will be used for each RequestPolicy within the created HttpPipeline.
|
||||
*/
|
||||
pipelineLogger?: HttpPipelineLogger;
|
||||
}
|
|
@ -7,42 +7,42 @@ import { HttpMethod } from "./httpMethod";
|
|||
* An individual HTTP request that can be sent with a HttpClient.
|
||||
*/
|
||||
export class HttpRequest {
|
||||
private readonly _headers: HttpHeaders;
|
||||
private readonly _headers: HttpHeaders;
|
||||
|
||||
/**
|
||||
* Create a new HTTP request using the provided properties.
|
||||
* @param _httpMethod The HTTP method that will be used to send this request.
|
||||
* @param url The URL that this request will be sent to.
|
||||
* @param headers The HTTP headers to include in this request.
|
||||
* @param _body The body of this HTTP request.
|
||||
*/
|
||||
constructor(public httpMethod: HttpMethod, public url: string, headers: HttpHeaders | RawHttpHeaders, private _body?: string) {
|
||||
if (!this.url) {
|
||||
const urlString: string = (this.url == undefined ? this.url : `"${this.url}"`);
|
||||
throw new Error(`${urlString} is not a valid URL for a HttpRequest.`);
|
||||
}
|
||||
|
||||
this._headers = (headers instanceof HttpHeaders ? headers : new HttpHeaders(headers));
|
||||
/**
|
||||
* Create a new HTTP request using the provided properties.
|
||||
* @param httpMethod The HTTP method that will be used to send this request.
|
||||
* @param url The URL that this request will be sent to.
|
||||
* @param headers The HTTP headers to include in this request.
|
||||
* @param _body The body of this HTTP request.
|
||||
*/
|
||||
constructor(public httpMethod: HttpMethod, public url: string, headers: HttpHeaders | RawHttpHeaders, private _body?: string) {
|
||||
if (!this.url) {
|
||||
const urlString: string = (this.url == undefined ? this.url : `"${this.url}"`);
|
||||
throw new Error(`${urlString} is not a valid URL for a HttpRequest.`);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the HTTP headers that will be sent with this request.
|
||||
*/
|
||||
public get headers(): HttpHeaders {
|
||||
return this._headers;
|
||||
}
|
||||
this._headers = (headers instanceof HttpHeaders ? headers : new HttpHeaders(headers));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the body that will be sent with this request.
|
||||
*/
|
||||
public get body(): string | undefined {
|
||||
return this._body;
|
||||
}
|
||||
/**
|
||||
* Get the HTTP headers that will be sent with this request.
|
||||
*/
|
||||
public get headers(): HttpHeaders {
|
||||
return this._headers;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a deep clone/copy of this HttpRequest.
|
||||
*/
|
||||
public clone(): HttpRequest {
|
||||
return new HttpRequest(this.httpMethod, this.url, this.headers.clone(), this.body);
|
||||
}
|
||||
/**
|
||||
* Get the body that will be sent with this request.
|
||||
*/
|
||||
public get body(): string | undefined {
|
||||
return this._body;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a deep clone/copy of this HttpRequest.
|
||||
*/
|
||||
public clone(): HttpRequest {
|
||||
return new HttpRequest(this.httpMethod, this.url, this.headers.clone(), this.body);
|
||||
}
|
||||
}
|
|
@ -8,28 +8,28 @@ import { HttpHeaders } from "./httpHeaders";
|
|||
* A HTTP response that is received from a server after a HttpRequest has been sent.
|
||||
*/
|
||||
export interface HttpResponse {
|
||||
/**
|
||||
* The request that was the cause of this HttpResponse.
|
||||
*/
|
||||
request: HttpRequest;
|
||||
/**
|
||||
* The request that was the cause of this HttpResponse.
|
||||
*/
|
||||
request: HttpRequest;
|
||||
|
||||
/**
|
||||
* The status code number of this response.
|
||||
*/
|
||||
statusCode: number;
|
||||
/**
|
||||
* The status code number of this response.
|
||||
*/
|
||||
statusCode: number;
|
||||
|
||||
/**
|
||||
* The HTTP headers of this response.
|
||||
*/
|
||||
headers: HttpHeaders;
|
||||
/**
|
||||
* The HTTP headers of this response.
|
||||
*/
|
||||
headers: HttpHeaders;
|
||||
|
||||
/**
|
||||
* Get the body of this HttpResponse as a string.
|
||||
*/
|
||||
textBody(): Promise<string | undefined>;
|
||||
/**
|
||||
* Get the body of this HttpResponse as a string.
|
||||
*/
|
||||
textBody(): Promise<string | undefined>;
|
||||
|
||||
/**
|
||||
* Get the body of this HttpResponse after it has been deserialized.
|
||||
*/
|
||||
deserializedBody(): Promise<any>;
|
||||
/**
|
||||
* Get the body of this HttpResponse after it has been deserialized.
|
||||
*/
|
||||
deserializedBody(): Promise<any>;
|
||||
}
|
|
@ -5,28 +5,28 @@ import { HttpRequest } from "../lib/httpRequest";
|
|||
import { HttpResponse } from "../lib/httpResponse";
|
||||
|
||||
export class InMemoryHttpResponse implements HttpResponse {
|
||||
private readonly _headers: HttpHeaders;
|
||||
private readonly _headers: HttpHeaders;
|
||||
|
||||
constructor(private _request: HttpRequest, private _statusCode: number, headers: HttpHeaders | RawHttpHeaders, private _bodyText?: string) {
|
||||
this._headers = (headers instanceof HttpHeaders ? headers : new HttpHeaders(headers));
|
||||
}
|
||||
constructor(private _request: HttpRequest, private _statusCode: number, headers: HttpHeaders | RawHttpHeaders, private _bodyText?: string) {
|
||||
this._headers = (headers instanceof HttpHeaders ? headers : new HttpHeaders(headers));
|
||||
}
|
||||
|
||||
public get request(): HttpRequest {
|
||||
return this._request;
|
||||
}
|
||||
public get request(): HttpRequest {
|
||||
return this._request;
|
||||
}
|
||||
|
||||
public get statusCode(): number {
|
||||
return this._statusCode;
|
||||
}
|
||||
public get statusCode(): number {
|
||||
return this._statusCode;
|
||||
}
|
||||
|
||||
public get headers(): HttpHeaders {
|
||||
return this._headers;
|
||||
}
|
||||
public get headers(): HttpHeaders {
|
||||
return this._headers;
|
||||
}
|
||||
|
||||
textBody(): Promise<string | undefined> {
|
||||
return Promise.resolve(this._bodyText);
|
||||
}
|
||||
deserializedBody(): Promise<{} | any[] | undefined> {
|
||||
return Promise.resolve(this._bodyText ? JSON.parse(this._bodyText) : undefined);
|
||||
}
|
||||
textBody(): Promise<string | undefined> {
|
||||
return Promise.resolve(this._bodyText);
|
||||
}
|
||||
deserializedBody(): Promise<{} | any[] | undefined> {
|
||||
return Promise.resolve(this._bodyText ? JSON.parse(this._bodyText) : undefined);
|
||||
}
|
||||
}
|
|
@ -11,116 +11,116 @@ import * as utils from "../util/utils";
|
|||
* An error that can be thrown when the maximum number of attempts have been attempted.
|
||||
*/
|
||||
export interface RetryError extends Error {
|
||||
/**
|
||||
* The message that describes the retry failure.
|
||||
*/
|
||||
message: string;
|
||||
/**
|
||||
* The error code that describes the retry failure.
|
||||
*/
|
||||
code?: string;
|
||||
/**
|
||||
* An inner error that this RetryError wraps.
|
||||
*/
|
||||
innerError?: RetryError;
|
||||
/**
|
||||
* The message that describes the retry failure.
|
||||
*/
|
||||
message: string;
|
||||
/**
|
||||
* The error code that describes the retry failure.
|
||||
*/
|
||||
code?: string;
|
||||
/**
|
||||
* An inner error that this RetryError wraps.
|
||||
*/
|
||||
innerError?: RetryError;
|
||||
}
|
||||
|
||||
/**
|
||||
* The options that can be passed to an ExponentialRetryPolicy.
|
||||
*/
|
||||
export interface RetryOptions {
|
||||
/**
|
||||
* The maximum number of attempts that the retry policy will perform before failing. The first
|
||||
* attempt after a failure is considered the 2nd attempt.
|
||||
*/
|
||||
maximumAttempts?: number;
|
||||
/**
|
||||
* The number of milliseconds to delay before attempting again.
|
||||
*/
|
||||
initialRetryDelayInMilliseconds?: number;
|
||||
/**
|
||||
* The maximum number of milliseconds to wait before retrying.
|
||||
*/
|
||||
maximumRetryIntervalInMilliseconds?: number;
|
||||
/**
|
||||
* The function to use to delay before sending a retry attempt.
|
||||
*/
|
||||
delayFunction?: (delayInMilliseconds: number) => Promise<void>;
|
||||
/**
|
||||
* The maximum number of attempts that the retry policy will perform before failing. The first
|
||||
* attempt after a failure is considered the 2nd attempt.
|
||||
*/
|
||||
maximumAttempts?: number;
|
||||
/**
|
||||
* The number of milliseconds to delay before attempting again.
|
||||
*/
|
||||
initialRetryDelayInMilliseconds?: number;
|
||||
/**
|
||||
* The maximum number of milliseconds to wait before retrying.
|
||||
*/
|
||||
maximumRetryIntervalInMilliseconds?: number;
|
||||
/**
|
||||
* The function to use to delay before sending a retry attempt.
|
||||
*/
|
||||
delayFunction?: (delayInMilliseconds: number) => Promise<void>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a RequestPolicyFactory that creates ExponentialRetryPolicies.
|
||||
*/
|
||||
export function exponentialRetryPolicy(retryOptions?: RetryOptions): RequestPolicyFactory {
|
||||
return (nextPolicy: RequestPolicy, options: RequestPolicyOptions) => {
|
||||
return new ExponentialRetryPolicy(retryOptions || {}, nextPolicy, options);
|
||||
};
|
||||
return (nextPolicy: RequestPolicy, options: RequestPolicyOptions) => {
|
||||
return new ExponentialRetryPolicy(retryOptions || {}, nextPolicy, options);
|
||||
};
|
||||
}
|
||||
|
||||
export class ExponentialRetryPolicy extends BaseRequestPolicy {
|
||||
private readonly _maximumAttempts: number;
|
||||
private readonly _initialRetryDelayInMilliseconds: number;
|
||||
private readonly _maximumRetryDelayInMilliseconds: number;
|
||||
private readonly _delayFunction: (delayInMilliseconds: number) => Promise<void>;
|
||||
private readonly _maximumAttempts: number;
|
||||
private readonly _initialRetryDelayInMilliseconds: number;
|
||||
private readonly _maximumRetryDelayInMilliseconds: number;
|
||||
private readonly _delayFunction: (delayInMilliseconds: number) => Promise<void>;
|
||||
|
||||
constructor(retryOptions: RetryOptions, nextPolicy: RequestPolicy, options: RequestPolicyOptions) {
|
||||
super(nextPolicy, options);
|
||||
constructor(retryOptions: RetryOptions, nextPolicy: RequestPolicy, options: RequestPolicyOptions) {
|
||||
super(nextPolicy, options);
|
||||
|
||||
this._maximumAttempts = retryOptions.maximumAttempts || 3;
|
||||
this._initialRetryDelayInMilliseconds = retryOptions.initialRetryDelayInMilliseconds || 30 * 1000;
|
||||
this._maximumRetryDelayInMilliseconds = retryOptions.maximumRetryIntervalInMilliseconds || 90 * 1000;
|
||||
this._delayFunction = retryOptions.delayFunction || utils.delay;
|
||||
this._maximumAttempts = retryOptions.maximumAttempts || 3;
|
||||
this._initialRetryDelayInMilliseconds = retryOptions.initialRetryDelayInMilliseconds || 30 * 1000;
|
||||
this._maximumRetryDelayInMilliseconds = retryOptions.maximumRetryIntervalInMilliseconds || 90 * 1000;
|
||||
this._delayFunction = retryOptions.delayFunction || utils.delay;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get whether or not we should retry the request based on the provided response.
|
||||
* @param response The response to read to determine whether or not we should retry.
|
||||
*/
|
||||
protected shouldRetry(details: { response?: HttpResponse, responseError?: RetryError }): boolean {
|
||||
let result = true;
|
||||
|
||||
if (details.response) {
|
||||
const statusCode: number = details.response.statusCode;
|
||||
if ((statusCode < 500 && statusCode !== 408) || statusCode === 501 || statusCode === 505) {
|
||||
result = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get whether or not we should retry the request based on the provided response.
|
||||
* @param response The response to read to determine whether or not we should retry.
|
||||
*/
|
||||
protected shouldRetry(details: { response?: HttpResponse, responseError?: RetryError}): boolean {
|
||||
let result = true;
|
||||
return result;
|
||||
}
|
||||
|
||||
if (details.response) {
|
||||
const statusCode: number = details.response.statusCode;
|
||||
if ((statusCode < 500 && statusCode !== 408) || statusCode === 501 || statusCode === 505) {
|
||||
result = false;
|
||||
}
|
||||
public async send(request: HttpRequest): Promise<HttpResponse> {
|
||||
let response: HttpResponse | undefined = undefined;
|
||||
let shouldAttempt = true;
|
||||
let attemptNumber = 0;
|
||||
let attemptDelayInMilliseconds: number = this._initialRetryDelayInMilliseconds;
|
||||
let responseError: RetryError | undefined;
|
||||
while (shouldAttempt) {
|
||||
try {
|
||||
++attemptNumber;
|
||||
response = await this._nextPolicy.send(request.clone());
|
||||
shouldAttempt = this.shouldRetry({ response: response });
|
||||
} catch (error) {
|
||||
if (responseError) {
|
||||
error.innerError = responseError;
|
||||
}
|
||||
responseError = error;
|
||||
shouldAttempt = this.shouldRetry({ responseError: responseError });
|
||||
}
|
||||
|
||||
shouldAttempt = shouldAttempt && attemptNumber < this._maximumAttempts;
|
||||
if (shouldAttempt) {
|
||||
response = undefined;
|
||||
|
||||
if (attemptNumber >= 2) {
|
||||
const boundedRandomDelta: number = (attemptDelayInMilliseconds * 0.8) + Math.floor(Math.random() * attemptDelayInMilliseconds * 0.4);
|
||||
const incrementDelta: number = (Math.pow(2, attemptNumber) - 1) * boundedRandomDelta;
|
||||
attemptDelayInMilliseconds = Math.min(attemptDelayInMilliseconds + incrementDelta, this._maximumRetryDelayInMilliseconds);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public async send(request: HttpRequest): Promise<HttpResponse> {
|
||||
let response: HttpResponse | undefined = undefined;
|
||||
let shouldAttempt = true;
|
||||
let attemptNumber = 0;
|
||||
let attemptDelayInMilliseconds: number = this._initialRetryDelayInMilliseconds;
|
||||
let responseError: RetryError | undefined;
|
||||
while (shouldAttempt) {
|
||||
try {
|
||||
++attemptNumber;
|
||||
response = await this._nextPolicy.send(request.clone());
|
||||
shouldAttempt = this.shouldRetry({ response: response });
|
||||
} catch (error) {
|
||||
if (responseError) {
|
||||
error.innerError = responseError;
|
||||
}
|
||||
responseError = error;
|
||||
shouldAttempt = this.shouldRetry({ responseError: responseError });
|
||||
}
|
||||
|
||||
shouldAttempt = shouldAttempt && attemptNumber < this._maximumAttempts;
|
||||
if (shouldAttempt) {
|
||||
response = undefined;
|
||||
|
||||
if (attemptNumber >= 2) {
|
||||
const boundedRandomDelta: number = (attemptDelayInMilliseconds * 0.8) + Math.floor(Math.random() * attemptDelayInMilliseconds * 0.4);
|
||||
const incrementDelta: number = (Math.pow(2, attemptNumber) - 1) * boundedRandomDelta;
|
||||
attemptDelayInMilliseconds = Math.min(attemptDelayInMilliseconds + incrementDelta, this._maximumRetryDelayInMilliseconds);
|
||||
}
|
||||
|
||||
await this._delayFunction(attemptDelayInMilliseconds);
|
||||
}
|
||||
}
|
||||
return response ? Promise.resolve(response) : Promise.reject(responseError);
|
||||
await this._delayFunction(attemptDelayInMilliseconds);
|
||||
}
|
||||
}
|
||||
return response ? Promise.resolve(response) : Promise.reject(responseError);
|
||||
}
|
||||
}
|
|
@ -12,24 +12,24 @@ import { RequestPolicyOptions } from "../requestPolicyOptions";
|
|||
* @param logFunction The function to use to log messages.
|
||||
*/
|
||||
export function logPolicy(logFunction: (message: string) => void): RequestPolicyFactory {
|
||||
return (nextPolicy: RequestPolicy, options: RequestPolicyOptions) => {
|
||||
return new LogPolicy(logFunction, nextPolicy, options);
|
||||
};
|
||||
return (nextPolicy: RequestPolicy, options: RequestPolicyOptions) => {
|
||||
return new LogPolicy(logFunction, nextPolicy, options);
|
||||
};
|
||||
}
|
||||
|
||||
class LogPolicy extends BaseRequestPolicy {
|
||||
constructor(private readonly _logFunction: (message: string) => void, nextPolicy: RequestPolicy, options: RequestPolicyOptions) {
|
||||
super(nextPolicy, options);
|
||||
}
|
||||
constructor(private readonly _logFunction: (message: string) => void, nextPolicy: RequestPolicy, options: RequestPolicyOptions) {
|
||||
super(nextPolicy, options);
|
||||
}
|
||||
|
||||
public async send(request: HttpRequest): Promise<HttpResponse> {
|
||||
this._logFunction(`>> Request: ${JSON.stringify(request, undefined, 2)}`);
|
||||
public async send(request: HttpRequest): Promise<HttpResponse> {
|
||||
this._logFunction(`>> Request: ${JSON.stringify(request, undefined, 2)}`);
|
||||
|
||||
const response: HttpResponse = await this._nextPolicy.send(request);
|
||||
const responseBodyText: string | undefined = await response.textBody();
|
||||
this._logFunction(`>> Response Status Code: ${response.statusCode}`);
|
||||
this._logFunction(`>> Response Body: ${responseBodyText}`);
|
||||
const response: HttpResponse = await this._nextPolicy.send(request);
|
||||
const responseBodyText: string | undefined = await response.textBody();
|
||||
this._logFunction(`>> Response Status Code: ${response.statusCode}`);
|
||||
this._logFunction(`>> Response Body: ${responseBodyText}`);
|
||||
|
||||
return new InMemoryHttpResponse(response.request, response.statusCode, response.headers, responseBodyText);
|
||||
}
|
||||
return new InMemoryHttpResponse(response.request, response.statusCode, response.headers, responseBodyText);
|
||||
}
|
||||
}
|
|
@ -13,40 +13,40 @@ import { Constants } from "../util/constants";
|
|||
* @param userAgentInfo The string[] of userAgent details to apply to each outgoing request.
|
||||
*/
|
||||
export function msRestNodeJsUserAgentPolicy(userAgentInfo: string[]): RequestPolicyFactory {
|
||||
return (nextPolicy: RequestPolicy, options: RequestPolicyOptions) => {
|
||||
return new MsRestNodeJsUserAgentPolicy(userAgentInfo, nextPolicy, options);
|
||||
};
|
||||
return (nextPolicy: RequestPolicy, options: RequestPolicyOptions) => {
|
||||
return new MsRestNodeJsUserAgentPolicy(userAgentInfo, nextPolicy, options);
|
||||
};
|
||||
}
|
||||
|
||||
class MsRestNodeJsUserAgentPolicy extends BaseRequestPolicy {
|
||||
constructor(private readonly _userAgentInfo: string[], nextPolicy: RequestPolicy, options: RequestPolicyOptions) {
|
||||
super(nextPolicy, options);
|
||||
}
|
||||
|
||||
send(request: HttpRequest): Promise<HttpResponse> {
|
||||
if (!request.headers.get(Constants.HeaderConstants.USER_AGENT)) {
|
||||
const osInfo = `(${os.arch()}-${os.type()}-${os.release()})`;
|
||||
if (this._userAgentInfo.indexOf(osInfo) === -1) {
|
||||
this._userAgentInfo.unshift(osInfo);
|
||||
}
|
||||
|
||||
const runtimeInfo = `Node/${process.version}`;
|
||||
if (this._userAgentInfo.indexOf(runtimeInfo) === -1) {
|
||||
this._userAgentInfo.unshift(runtimeInfo);
|
||||
}
|
||||
|
||||
const nodeSDKSignature = `Azure-SDK-For-Node`;
|
||||
if (this._userAgentInfo.indexOf(nodeSDKSignature) === -1) {
|
||||
const azureRuntime = `ms-rest-azure`;
|
||||
|
||||
let insertIndex = this._userAgentInfo.indexOf(azureRuntime);
|
||||
// insert after azureRuntime, otherwise, insert last.
|
||||
insertIndex = insertIndex < 0 ? this._userAgentInfo.length : insertIndex + 1;
|
||||
this._userAgentInfo.splice(insertIndex, 0, nodeSDKSignature);
|
||||
}
|
||||
|
||||
request.headers.set(Constants.HeaderConstants.USER_AGENT, this._userAgentInfo.join(" "));
|
||||
}
|
||||
return this._nextPolicy.send(request);
|
||||
constructor(private readonly _userAgentInfo: string[], nextPolicy: RequestPolicy, options: RequestPolicyOptions) {
|
||||
super(nextPolicy, options);
|
||||
}
|
||||
|
||||
send(request: HttpRequest): Promise<HttpResponse> {
|
||||
if (!request.headers.get(Constants.HeaderConstants.USER_AGENT)) {
|
||||
const osInfo = `(${os.arch()}-${os.type()}-${os.release()})`;
|
||||
if (this._userAgentInfo.indexOf(osInfo) === -1) {
|
||||
this._userAgentInfo.unshift(osInfo);
|
||||
}
|
||||
|
||||
const runtimeInfo = `Node/${process.version}`;
|
||||
if (this._userAgentInfo.indexOf(runtimeInfo) === -1) {
|
||||
this._userAgentInfo.unshift(runtimeInfo);
|
||||
}
|
||||
|
||||
const nodeSDKSignature = `Azure-SDK-For-Node`;
|
||||
if (this._userAgentInfo.indexOf(nodeSDKSignature) === -1) {
|
||||
const azureRuntime = `ms-rest-azure`;
|
||||
|
||||
let insertIndex = this._userAgentInfo.indexOf(azureRuntime);
|
||||
// insert after azureRuntime, otherwise, insert last.
|
||||
insertIndex = insertIndex < 0 ? this._userAgentInfo.length : insertIndex + 1;
|
||||
this._userAgentInfo.splice(insertIndex, 0, nodeSDKSignature);
|
||||
}
|
||||
|
||||
request.headers.set(Constants.HeaderConstants.USER_AGENT, this._userAgentInfo.join(" "));
|
||||
}
|
||||
return this._nextPolicy.send(request);
|
||||
}
|
||||
}
|
|
@ -13,42 +13,42 @@ import { RequestPolicyOptions } from "../requestPolicyOptions";
|
|||
* @param maximumRedirections The maximum number of redirections to take before failing.
|
||||
*/
|
||||
export function redirectPolicy(maximumRedirections: number): RequestPolicyFactory {
|
||||
return (nextPolicy: RequestPolicy, options: RequestPolicyOptions) => {
|
||||
return new RedirectPolicy(maximumRedirections, nextPolicy, options);
|
||||
};
|
||||
return (nextPolicy: RequestPolicy, options: RequestPolicyOptions) => {
|
||||
return new RedirectPolicy(maximumRedirections, nextPolicy, options);
|
||||
};
|
||||
}
|
||||
|
||||
class RedirectPolicy extends BaseRequestPolicy {
|
||||
constructor(private readonly _maximumRedirections: number, nextPolicy: RequestPolicy, options: RequestPolicyOptions) {
|
||||
super(nextPolicy, options);
|
||||
}
|
||||
constructor(private readonly _maximumRedirections: number, nextPolicy: RequestPolicy, options: RequestPolicyOptions) {
|
||||
super(nextPolicy, options);
|
||||
}
|
||||
|
||||
async send(request: HttpRequest): Promise<HttpResponse> {
|
||||
request = request.clone();
|
||||
async send(request: HttpRequest): Promise<HttpResponse> {
|
||||
request = request.clone();
|
||||
|
||||
let redirections = 0;
|
||||
let response: HttpResponse;
|
||||
while (true) {
|
||||
response = await this._nextPolicy.send(request.clone());
|
||||
let redirections = 0;
|
||||
let response: HttpResponse;
|
||||
while (true) {
|
||||
response = await this._nextPolicy.send(request.clone());
|
||||
|
||||
if (response && response.headers && response.headers.get("location") &&
|
||||
(response.statusCode === 300 || response.statusCode === 307 || (response.statusCode === 303 && request.httpMethod === HttpMethod.POST)) &&
|
||||
(!this._maximumRedirections || redirections < this._maximumRedirections)) {
|
||||
if (response && response.headers && response.headers.get("location") &&
|
||||
(response.statusCode === 300 || response.statusCode === 307 || (response.statusCode === 303 && request.httpMethod === HttpMethod.POST)) &&
|
||||
(!this._maximumRedirections || redirections < this._maximumRedirections)) {
|
||||
|
||||
++redirections;
|
||||
++redirections;
|
||||
|
||||
request.url = parse(response.headers.get("location")!, parse(request.url)).href;
|
||||
request.url = parse(response.headers.get("location")!, parse(request.url)).href;
|
||||
|
||||
// POST request with Status code 303 should be converted into a
|
||||
// redirected GET request if the redirect url is present in the location header
|
||||
if (response.statusCode === 303) {
|
||||
request.httpMethod = HttpMethod.GET;
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
// POST request with Status code 303 should be converted into a
|
||||
// redirected GET request if the redirect url is present in the location header
|
||||
if (response.statusCode === 303) {
|
||||
request.httpMethod = HttpMethod.GET;
|
||||
}
|
||||
|
||||
return response;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
}
|
|
@ -13,155 +13,155 @@ import * as utils from "../util/utils";
|
|||
* @param retryTimeoutInSeconds The number of seconds to wait before retrying.
|
||||
*/
|
||||
export function rpRegistrationPolicy(retryTimeoutInSeconds = 30): RequestPolicyFactory {
|
||||
return (nextPolicy: RequestPolicy, options: RequestPolicyOptions) => {
|
||||
return new RpRegistrationPolicy(retryTimeoutInSeconds, nextPolicy, options);
|
||||
};
|
||||
return (nextPolicy: RequestPolicy, options: RequestPolicyOptions) => {
|
||||
return new RpRegistrationPolicy(retryTimeoutInSeconds, nextPolicy, options);
|
||||
};
|
||||
}
|
||||
|
||||
class RpRegistrationPolicy extends BaseRequestPolicy {
|
||||
constructor(private readonly _retryTimeoutInSeconds: number, nextPolicy: RequestPolicy, options: RequestPolicyOptions) {
|
||||
super(nextPolicy, options);
|
||||
constructor(private readonly _retryTimeoutInSeconds: number, nextPolicy: RequestPolicy, options: RequestPolicyOptions) {
|
||||
super(nextPolicy, options);
|
||||
}
|
||||
|
||||
public async send(request: HttpRequest): Promise<HttpResponse> {
|
||||
request = request.clone();
|
||||
|
||||
let response: HttpResponse = await this._nextPolicy.send(request.clone());
|
||||
|
||||
let rpName: string | undefined;
|
||||
if (response.statusCode === 409) {
|
||||
const textBody: string | undefined = await response.textBody();
|
||||
rpName = this.checkRPNotRegisteredError(textBody);
|
||||
}
|
||||
|
||||
public async send(request: HttpRequest): Promise<HttpResponse> {
|
||||
request = request.clone();
|
||||
if (rpName) {
|
||||
const urlPrefix: string = this.extractSubscriptionUrl(request.url);
|
||||
let registrationStatus = false;
|
||||
try {
|
||||
registrationStatus = await this.registerRP(urlPrefix, rpName, request);
|
||||
} catch (err) {
|
||||
// Autoregistration of ${provider} failed for some reason. We will not return this error
|
||||
// instead will return the initial response with 409 status code back to the user.
|
||||
// do nothing here as we are returning the original response at the end of this method.
|
||||
}
|
||||
|
||||
let response: HttpResponse = await this._nextPolicy.send(request.clone());
|
||||
|
||||
let rpName: string | undefined;
|
||||
if (response.statusCode === 409) {
|
||||
const textBody: string | undefined = await response.textBody();
|
||||
rpName = this.checkRPNotRegisteredError(textBody);
|
||||
}
|
||||
|
||||
if (rpName) {
|
||||
const urlPrefix: string = this.extractSubscriptionUrl(request.url);
|
||||
let registrationStatus = false;
|
||||
try {
|
||||
registrationStatus = await this.registerRP(urlPrefix, rpName, request);
|
||||
} catch (err) {
|
||||
// Autoregistration of ${provider} failed for some reason. We will not return this error
|
||||
// instead will return the initial response with 409 status code back to the user.
|
||||
// do nothing here as we are returning the original response at the end of this method.
|
||||
}
|
||||
|
||||
if (registrationStatus) {
|
||||
// Retry the original request. We have to change the x-ms-client-request-id
|
||||
// otherwise Azure endpoint will return the initial 409 (cached) response.
|
||||
request.headers.set("x-ms-client-request-id", utils.generateUuid());
|
||||
response = await this._nextPolicy.send(request);
|
||||
}
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates the error code and message associated with 409 response status code. If it matches to that of
|
||||
* RP not registered then it returns the name of the RP else returns undefined.
|
||||
* @param textBody - The response body received after making the original request.
|
||||
* @returns The name of the RP if condition is satisfied else undefined.
|
||||
*/
|
||||
private checkRPNotRegisteredError(textBody?: string): string | undefined {
|
||||
let result: string | undefined;
|
||||
if (textBody) {
|
||||
let responseBody: { error?: { message?: string, code?: string } } = {};
|
||||
try {
|
||||
responseBody = JSON.parse(textBody);
|
||||
} catch (err) {
|
||||
// do nothing;
|
||||
}
|
||||
if (responseBody && responseBody.error && responseBody.error.message &&
|
||||
responseBody.error.code && responseBody.error.code === "MissingSubscriptionRegistration") {
|
||||
|
||||
const matchRes: RegExpMatchArray | null = responseBody.error.message.match(/.*'(.*)'/i);
|
||||
if (matchRes) {
|
||||
result = matchRes.pop();
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts the first part of the URL, just after subscription:
|
||||
* https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/
|
||||
* @param {string} url - The original request url
|
||||
* @returns {string} urlPrefix The url prefix as explained above.
|
||||
*/
|
||||
private extractSubscriptionUrl(url: string): string {
|
||||
let result: string;
|
||||
const matchRes: RegExpMatchArray | null = url.match(/.*\/subscriptions\/[a-f0-9-]+\//ig);
|
||||
if (matchRes && matchRes[0]) {
|
||||
result = matchRes[0];
|
||||
} else {
|
||||
throw new Error(`Unable to extract subscriptionId from the given url - ${url}.`);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers the given provider.
|
||||
* @param {string} urlPrefix - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/
|
||||
* @param {string} provider - The provider name to be registered.
|
||||
* @param {object} originalRequest - The original request sent by the user that returned a 409 response
|
||||
* with a message that the provider is not registered.
|
||||
* @param {registrationCallback} callback - The callback that handles the RP registration
|
||||
*/
|
||||
private async registerRP(urlPrefix: string, provider: string, originalRequest: HttpRequest): Promise<boolean> {
|
||||
const postUrl = `${urlPrefix}providers/${provider}/register?api-version=2016-02-01`;
|
||||
const getUrl = `${urlPrefix}providers/${provider}?api-version=2016-02-01`;
|
||||
const nextRequest: HttpRequest = originalRequest.clone();
|
||||
this.setEssentialHeaders(nextRequest);
|
||||
nextRequest.httpMethod = HttpMethod.POST;
|
||||
nextRequest.url = postUrl;
|
||||
|
||||
const response: HttpResponse = await this._nextPolicy.send(nextRequest);
|
||||
if (response.statusCode !== 200) {
|
||||
throw new Error(`Autoregistration of ${provider} failed. Please try registering manually.`);
|
||||
}
|
||||
|
||||
return await this.getRegistrationStatus(getUrl, originalRequest);
|
||||
}
|
||||
|
||||
/**
|
||||
* Polls the registration status of the provider that was registered. Polling happens at an interval of 30 seconds.
|
||||
* Polling will happen till the registrationState property of the response body is "Registered".
|
||||
* @param {string} url - The request url for polling
|
||||
* @param {object} originalRequest - The original request sent by the user that returned a 409 response
|
||||
* with a message that the provider is not registered.
|
||||
* @returns {Promise<boolean>} promise - True if RP Registration is successful.
|
||||
*/
|
||||
private async getRegistrationStatus(url: string, originalRequest: HttpRequest): Promise<boolean> {
|
||||
const nextRequest: HttpRequest = originalRequest.clone();
|
||||
this.setEssentialHeaders(nextRequest);
|
||||
nextRequest.url = url;
|
||||
nextRequest.httpMethod = HttpMethod.GET;
|
||||
const response: HttpResponse = await this._nextPolicy.send(nextRequest);
|
||||
|
||||
let result = false;
|
||||
const deserializedBody: { registrationState: string } = await response.deserializedBody();
|
||||
if (deserializedBody && deserializedBody.registrationState === "Registered") {
|
||||
result = true;
|
||||
} else {
|
||||
await utils.delay(this._retryTimeoutInSeconds * 1000);
|
||||
result = await this.getRegistrationStatus(url, originalRequest);
|
||||
}
|
||||
return Promise.resolve(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reuses the headers of the original request and url (if specified).
|
||||
* @param originalRequest The original request
|
||||
* @param reuseUrlToo Should the url from the original request be reused as well. Default false.
|
||||
* @returns A new request object with desired headers.
|
||||
*/
|
||||
private setEssentialHeaders(request: HttpRequest): void {
|
||||
// We have to change the x-ms-client-request-id otherwise Azure endpoint
|
||||
// will return the initial 409 (cached) response.
|
||||
if (registrationStatus) {
|
||||
// Retry the original request. We have to change the x-ms-client-request-id
|
||||
// otherwise Azure endpoint will return the initial 409 (cached) response.
|
||||
request.headers.set("x-ms-client-request-id", utils.generateUuid());
|
||||
|
||||
// Set content-type to application/json
|
||||
request.headers.set("Content-Type", "application/json; charset=utf-8");
|
||||
response = await this._nextPolicy.send(request);
|
||||
}
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates the error code and message associated with 409 response status code. If it matches to that of
|
||||
* RP not registered then it returns the name of the RP else returns undefined.
|
||||
* @param textBody - The response body received after making the original request.
|
||||
* @returns The name of the RP if condition is satisfied else undefined.
|
||||
*/
|
||||
private checkRPNotRegisteredError(textBody?: string): string | undefined {
|
||||
let result: string | undefined;
|
||||
if (textBody) {
|
||||
let responseBody: { error?: { message?: string, code?: string } } = {};
|
||||
try {
|
||||
responseBody = JSON.parse(textBody);
|
||||
} catch (err) {
|
||||
// do nothing;
|
||||
}
|
||||
if (responseBody && responseBody.error && responseBody.error.message &&
|
||||
responseBody.error.code && responseBody.error.code === "MissingSubscriptionRegistration") {
|
||||
|
||||
const matchRes: RegExpMatchArray | null = responseBody.error.message.match(/.*'(.*)'/i);
|
||||
if (matchRes) {
|
||||
result = matchRes.pop();
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts the first part of the URL, just after subscription:
|
||||
* https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/
|
||||
* @param {string} url - The original request url
|
||||
* @returns {string} urlPrefix The url prefix as explained above.
|
||||
*/
|
||||
private extractSubscriptionUrl(url: string): string {
|
||||
let result: string;
|
||||
const matchRes: RegExpMatchArray | null = url.match(/.*\/subscriptions\/[a-f0-9-]+\//ig);
|
||||
if (matchRes && matchRes[0]) {
|
||||
result = matchRes[0];
|
||||
} else {
|
||||
throw new Error(`Unable to extract subscriptionId from the given url - ${url}.`);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers the given provider.
|
||||
* @param {string} urlPrefix - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/
|
||||
* @param {string} provider - The provider name to be registered.
|
||||
* @param {object} originalRequest - The original request sent by the user that returned a 409 response
|
||||
* with a message that the provider is not registered.
|
||||
* @param {registrationCallback} callback - The callback that handles the RP registration
|
||||
*/
|
||||
private async registerRP(urlPrefix: string, provider: string, originalRequest: HttpRequest): Promise<boolean> {
|
||||
const postUrl = `${urlPrefix}providers/${provider}/register?api-version=2016-02-01`;
|
||||
const getUrl = `${urlPrefix}providers/${provider}?api-version=2016-02-01`;
|
||||
const nextRequest: HttpRequest = originalRequest.clone();
|
||||
this.setEssentialHeaders(nextRequest);
|
||||
nextRequest.httpMethod = HttpMethod.POST;
|
||||
nextRequest.url = postUrl;
|
||||
|
||||
const response: HttpResponse = await this._nextPolicy.send(nextRequest);
|
||||
if (response.statusCode !== 200) {
|
||||
throw new Error(`Autoregistration of ${provider} failed. Please try registering manually.`);
|
||||
}
|
||||
|
||||
return await this.getRegistrationStatus(getUrl, originalRequest);
|
||||
}
|
||||
|
||||
/**
|
||||
* Polls the registration status of the provider that was registered. Polling happens at an interval of 30 seconds.
|
||||
* Polling will happen till the registrationState property of the response body is "Registered".
|
||||
* @param {string} url - The request url for polling
|
||||
* @param {object} originalRequest - The original request sent by the user that returned a 409 response
|
||||
* with a message that the provider is not registered.
|
||||
* @returns {Promise<boolean>} promise - True if RP Registration is successful.
|
||||
*/
|
||||
private async getRegistrationStatus(url: string, originalRequest: HttpRequest): Promise<boolean> {
|
||||
const nextRequest: HttpRequest = originalRequest.clone();
|
||||
this.setEssentialHeaders(nextRequest);
|
||||
nextRequest.url = url;
|
||||
nextRequest.httpMethod = HttpMethod.GET;
|
||||
const response: HttpResponse = await this._nextPolicy.send(nextRequest);
|
||||
|
||||
let result = false;
|
||||
const deserializedBody: { registrationState: string } = await response.deserializedBody();
|
||||
if (deserializedBody && deserializedBody.registrationState === "Registered") {
|
||||
result = true;
|
||||
} else {
|
||||
await utils.delay(this._retryTimeoutInSeconds * 1000);
|
||||
result = await this.getRegistrationStatus(url, originalRequest);
|
||||
}
|
||||
return Promise.resolve(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reuses the headers of the original request and url (if specified).
|
||||
* @param originalRequest The original request
|
||||
* @param reuseUrlToo Should the url from the original request be reused as well. Default false.
|
||||
* @returns A new request object with desired headers.
|
||||
*/
|
||||
private setEssentialHeaders(request: HttpRequest): void {
|
||||
// We have to change the x-ms-client-request-id otherwise Azure endpoint
|
||||
// will return the initial 409 (cached) response.
|
||||
request.headers.set("x-ms-client-request-id", utils.generateUuid());
|
||||
|
||||
// Set content-type to application/json
|
||||
request.headers.set("Content-Type", "application/json; charset=utf-8");
|
||||
}
|
||||
}
|
|
@ -12,18 +12,18 @@ import { RequestPolicyOptions } from "../requestPolicyOptions";
|
|||
* @param authenticationProvider The provider to use to sign requests.
|
||||
*/
|
||||
export function signingPolicy(authenticationProvider: ServiceClientCredentials): RequestPolicyFactory {
|
||||
return (nextPolicy: RequestPolicy, options: RequestPolicyOptions) => {
|
||||
return new SigningPolicy(authenticationProvider, nextPolicy, options);
|
||||
};
|
||||
return (nextPolicy: RequestPolicy, options: RequestPolicyOptions) => {
|
||||
return new SigningPolicy(authenticationProvider, nextPolicy, options);
|
||||
};
|
||||
}
|
||||
|
||||
class SigningPolicy extends BaseRequestPolicy {
|
||||
constructor(private readonly _authenticationProvider: ServiceClientCredentials, nextPolicy: RequestPolicy, options: RequestPolicyOptions) {
|
||||
super(nextPolicy, options);
|
||||
}
|
||||
constructor(private readonly _authenticationProvider: ServiceClientCredentials, nextPolicy: RequestPolicy, options: RequestPolicyOptions) {
|
||||
super(nextPolicy, options);
|
||||
}
|
||||
|
||||
public async send(request: HttpRequest): Promise<HttpResponse> {
|
||||
const signedRequest: HttpRequest = await this._authenticationProvider.signHttpRequest(request);
|
||||
return await this._nextPolicy.send(signedRequest);
|
||||
}
|
||||
public async send(request: HttpRequest): Promise<HttpResponse> {
|
||||
const signedRequest: HttpRequest = await this._authenticationProvider.signHttpRequest(request);
|
||||
return await this._nextPolicy.send(signedRequest);
|
||||
}
|
||||
}
|
|
@ -11,35 +11,35 @@ import { RetryOptions, ExponentialRetryPolicy, RetryError } from "./exponentialR
|
|||
* @param authenticationProvider The provider to use to sign requests.
|
||||
*/
|
||||
export function systemErrorRetryPolicy(retryOptions?: RetryOptions): RequestPolicyFactory {
|
||||
return (nextPolicy: RequestPolicy, options: RequestPolicyOptions) => {
|
||||
return new SystemErrorRetryPolicy(retryOptions || {}, nextPolicy, options);
|
||||
};
|
||||
return (nextPolicy: RequestPolicy, options: RequestPolicyOptions) => {
|
||||
return new SystemErrorRetryPolicy(retryOptions || {}, nextPolicy, options);
|
||||
};
|
||||
}
|
||||
|
||||
class SystemErrorRetryPolicy extends ExponentialRetryPolicy {
|
||||
constructor(retryOptions: RetryOptions, nextPolicy: RequestPolicy, options: RequestPolicyOptions) {
|
||||
super(retryOptions, nextPolicy, options);
|
||||
constructor(retryOptions: RetryOptions, nextPolicy: RequestPolicy, options: RequestPolicyOptions) {
|
||||
super(retryOptions, nextPolicy, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get whether or not we should retry the request based on the provided response.
|
||||
* @param response The response to read to determine whether or not we should retry.
|
||||
*/
|
||||
protected shouldRetry(details: { response?: HttpResponse, responseError?: RetryError }): boolean {
|
||||
let result = true;
|
||||
|
||||
if (details.responseError && details.responseError.code) {
|
||||
switch (details.responseError.code) {
|
||||
case "ETIMEDOUT":
|
||||
case "ESOCKETTIMEDOUT":
|
||||
case "ECONNREFUSED":
|
||||
case "ECONNRESET":
|
||||
case "ENOENT":
|
||||
result = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get whether or not we should retry the request based on the provided response.
|
||||
* @param response The response to read to determine whether or not we should retry.
|
||||
*/
|
||||
protected shouldRetry(details: { response?: HttpResponse, responseError?: RetryError }): boolean {
|
||||
let result = true;
|
||||
|
||||
if (details.responseError && details.responseError.code) {
|
||||
switch (details.responseError.code) {
|
||||
case "ETIMEDOUT":
|
||||
case "ESOCKETTIMEDOUT":
|
||||
case "ECONNREFUSED":
|
||||
case "ECONNRESET":
|
||||
case "ENOENT":
|
||||
result = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
|
@ -13,21 +13,21 @@ import { Constants } from "../util/constants";
|
|||
* @param userAgent The userAgent string to apply to each outgoing request.
|
||||
*/
|
||||
export function userAgentPolicy(userAgent: string): RequestPolicyFactory {
|
||||
return (nextPolicy: RequestPolicy, options: RequestPolicyOptions) => {
|
||||
return new UserAgentPolicy(userAgent, nextPolicy, options);
|
||||
};
|
||||
return (nextPolicy: RequestPolicy, options: RequestPolicyOptions) => {
|
||||
return new UserAgentPolicy(userAgent, nextPolicy, options);
|
||||
};
|
||||
}
|
||||
|
||||
class UserAgentPolicy extends BaseRequestPolicy {
|
||||
constructor(private readonly _userAgent: string, nextPolicy: RequestPolicy, options: RequestPolicyOptions) {
|
||||
super(nextPolicy, options);
|
||||
}
|
||||
constructor(private readonly _userAgent: string, nextPolicy: RequestPolicy, options: RequestPolicyOptions) {
|
||||
super(nextPolicy, options);
|
||||
}
|
||||
|
||||
send(request: HttpRequest): Promise<HttpResponse> {
|
||||
if (this.shouldLog(HttpPipelineLogLevel.INFO)) {
|
||||
this.log(HttpPipelineLogLevel.INFO, `Set "${Constants.HeaderConstants.USER_AGENT}" header to "${this._userAgent}".`);
|
||||
}
|
||||
request.headers.set(Constants.HeaderConstants.USER_AGENT, this._userAgent);
|
||||
return this._nextPolicy.send(request);
|
||||
send(request: HttpRequest): Promise<HttpResponse> {
|
||||
if (this.shouldLog(HttpPipelineLogLevel.INFO)) {
|
||||
this.log(HttpPipelineLogLevel.INFO, `Set "${Constants.HeaderConstants.USER_AGENT}" header to "${this._userAgent}".`);
|
||||
}
|
||||
request.headers.set(Constants.HeaderConstants.USER_AGENT, this._userAgent);
|
||||
return this._nextPolicy.send(request);
|
||||
}
|
||||
}
|
|
@ -11,39 +11,39 @@ import { HttpPipelineLogLevel } from "./httpPipelineLogLevel";
|
|||
* e.g. add header, user agent, timeout, retry, etc.
|
||||
*/
|
||||
export interface RequestPolicy {
|
||||
/**
|
||||
* Send the provided HttpRequest request.
|
||||
* @param request The HTTP request to send.
|
||||
* @return A Promise that resolves to the HttpResponse from the targeted server.
|
||||
*/
|
||||
send(request: HttpRequest): Promise<HttpResponse>;
|
||||
/**
|
||||
* Send the provided HttpRequest request.
|
||||
* @param request The HTTP request to send.
|
||||
* @return A Promise that resolves to the HttpResponse from the targeted server.
|
||||
*/
|
||||
send(request: HttpRequest): Promise<HttpResponse>;
|
||||
}
|
||||
|
||||
/**
|
||||
* A base class implementation of RequestPolicy.
|
||||
*/
|
||||
export abstract class BaseRequestPolicy implements RequestPolicy {
|
||||
constructor(protected readonly _nextPolicy: RequestPolicy, private readonly _options: RequestPolicyOptions) {
|
||||
}
|
||||
constructor(protected readonly _nextPolicy: RequestPolicy, private readonly _options: RequestPolicyOptions) {
|
||||
}
|
||||
|
||||
public abstract send(request: HttpRequest): Promise<HttpResponse>;
|
||||
public abstract send(request: HttpRequest): Promise<HttpResponse>;
|
||||
|
||||
/**
|
||||
* Get whether or not a log with the provided log level should be logged.
|
||||
* @param logLevel The log level of the log that will be logged.
|
||||
* @returns Whether or not a log with the provided log level should be logged.
|
||||
*/
|
||||
protected shouldLog(logLevel: HttpPipelineLogLevel): boolean {
|
||||
return this._options.shouldLog(logLevel);
|
||||
}
|
||||
/**
|
||||
* Get whether or not a log with the provided log level should be logged.
|
||||
* @param logLevel The log level of the log that will be logged.
|
||||
* @returns Whether or not a log with the provided log level should be logged.
|
||||
*/
|
||||
protected shouldLog(logLevel: HttpPipelineLogLevel): boolean {
|
||||
return this._options.shouldLog(logLevel);
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempt to log the provided message to the provided logger. If no logger was provided or if
|
||||
* the log level does not meat the logger's threshold, then nothing will be logged.
|
||||
* @param logLevel The log level of this log.
|
||||
* @param message The message of this log.
|
||||
*/
|
||||
protected log(logLevel: HttpPipelineLogLevel, message: string): void {
|
||||
this._options.log(logLevel, message);
|
||||
}
|
||||
/**
|
||||
* Attempt to log the provided message to the provided logger. If no logger was provided or if
|
||||
* the log level does not meat the logger's threshold, then nothing will be logged.
|
||||
* @param logLevel The log level of this log.
|
||||
* @param message The message of this log.
|
||||
*/
|
||||
protected log(logLevel: HttpPipelineLogLevel, message: string): void {
|
||||
this._options.log(logLevel, message);
|
||||
}
|
||||
}
|
|
@ -8,29 +8,29 @@ import { HttpPipelineLogLevel } from "./httpPipelineLogLevel";
|
|||
* Optional properties that can be used when creating a RequestPolicy.
|
||||
*/
|
||||
export class RequestPolicyOptions {
|
||||
constructor(private _logger?: HttpPipelineLogger) {
|
||||
}
|
||||
constructor(private _logger?: HttpPipelineLogger) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get whether or not a log with the provided log level should be logged.
|
||||
* @param logLevel The log level of the log that will be logged.
|
||||
* @returns Whether or not a log with the provided log level should be logged.
|
||||
*/
|
||||
public shouldLog(logLevel: HttpPipelineLogLevel): boolean {
|
||||
return !!this._logger &&
|
||||
logLevel !== HttpPipelineLogLevel.OFF &&
|
||||
logLevel <= this._logger.minimumLogLevel;
|
||||
}
|
||||
/**
|
||||
* Get whether or not a log with the provided log level should be logged.
|
||||
* @param logLevel The log level of the log that will be logged.
|
||||
* @returns Whether or not a log with the provided log level should be logged.
|
||||
*/
|
||||
public shouldLog(logLevel: HttpPipelineLogLevel): boolean {
|
||||
return !!this._logger &&
|
||||
logLevel !== HttpPipelineLogLevel.OFF &&
|
||||
logLevel <= this._logger.minimumLogLevel;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempt to log the provided message to the provided logger. If no logger was provided or if
|
||||
* the log level does not meat the logger's threshold, then nothing will be logged.
|
||||
* @param logLevel The log level of this log.
|
||||
* @param message The message of this log.
|
||||
*/
|
||||
public log(logLevel: HttpPipelineLogLevel, message: string): void {
|
||||
if (this._logger && this.shouldLog(logLevel)) {
|
||||
this._logger.log(logLevel, message);
|
||||
}
|
||||
/**
|
||||
* Attempt to log the provided message to the provided logger. If no logger was provided or if
|
||||
* the log level does not meat the logger's threshold, then nothing will be logged.
|
||||
* @param logLevel The log level of this log.
|
||||
* @param message The message of this log.
|
||||
*/
|
||||
public log(logLevel: HttpPipelineLogLevel, message: string): void {
|
||||
if (this._logger && this.shouldLog(logLevel)) {
|
||||
this._logger.log(logLevel, message);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -10,15 +10,15 @@ import { HttpResponse } from "../lib/httpResponse";
|
|||
* @returns A Promise that resolves to the HttpResponse from the targeted server.
|
||||
*/
|
||||
export class FakeHttpClient implements HttpClient {
|
||||
constructor(private readonly sendFunction: (request: HttpRequest) => Promise<HttpResponse>) {
|
||||
}
|
||||
constructor(private readonly sendFunction: (request: HttpRequest) => Promise<HttpResponse>) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Send the provided HttpRequest and return a Promise that resolves to the HttpResponse from the
|
||||
* targeted server.
|
||||
* @param request The HttpRequest to send.
|
||||
*/
|
||||
public send(request: HttpRequest): Promise<HttpResponse> {
|
||||
return this.sendFunction(request);
|
||||
}
|
||||
/**
|
||||
* Send the provided HttpRequest and return a Promise that resolves to the HttpResponse from the
|
||||
* targeted server.
|
||||
* @param request The HttpRequest to send.
|
||||
*/
|
||||
public send(request: HttpRequest): Promise<HttpResponse> {
|
||||
return this.sendFunction(request);
|
||||
}
|
||||
}
|
|
@ -7,22 +7,22 @@ import { HttpRequest } from "../lib/httpRequest";
|
|||
import { HttpResponse } from "../lib/httpResponse";
|
||||
|
||||
describe("fetchHttpClient", () => {
|
||||
it("should send HTTP requests", async () => {
|
||||
const request = new HttpRequest(HttpMethod.GET, "http://www.example.com", {});
|
||||
const httpClient = new FetchHttpClient();
|
||||
it("should send HTTP requests", async () => {
|
||||
const request = new HttpRequest(HttpMethod.GET, "http://www.example.com", {});
|
||||
const httpClient = new FetchHttpClient();
|
||||
|
||||
const response: HttpResponse = await httpClient.send(request)
|
||||
assert.deepStrictEqual(response.request, request);
|
||||
assert.strictEqual(response.statusCode, 200);
|
||||
assert(response.headers);
|
||||
assert.strictEqual(response.headers.get("connection"), "close");
|
||||
assert.strictEqual(response.headers.get("content-encoding"), "gzip");
|
||||
assert.strictEqual(response.headers.get("content-length"), "606");
|
||||
assert.strictEqual(response.headers.get("content-type"), "text/html");
|
||||
assert.strictEqual(response.headers.get("vary"), "Accept-Encoding");
|
||||
const responseBody: string | undefined = await response.textBody();
|
||||
const expectedResponseBody: string =
|
||||
`<!doctype html>
|
||||
const response: HttpResponse = await httpClient.send(request);
|
||||
assert.deepStrictEqual(response.request, request);
|
||||
assert.strictEqual(response.statusCode, 200);
|
||||
assert(response.headers);
|
||||
assert.strictEqual(response.headers.get("connection"), "close");
|
||||
assert.strictEqual(response.headers.get("content-encoding"), "gzip");
|
||||
assert.strictEqual(response.headers.get("content-length"), "606");
|
||||
assert.strictEqual(response.headers.get("content-type"), "text/html");
|
||||
assert.strictEqual(response.headers.get("vary"), "Accept-Encoding");
|
||||
const responseBody: string | undefined = await response.textBody();
|
||||
const expectedResponseBody =
|
||||
`<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Example Domain</title>
|
||||
|
@ -73,35 +73,35 @@ describe("fetchHttpClient", () => {
|
|||
</body>
|
||||
</html>
|
||||
`;
|
||||
assert.strictEqual(responseBody, expectedResponseBody);
|
||||
});
|
||||
assert.strictEqual(responseBody, expectedResponseBody);
|
||||
});
|
||||
|
||||
it("should throw for awaited 404", async () => {
|
||||
const request = new HttpRequest(HttpMethod.GET, "http://www.notanexample.coms", {});
|
||||
const httpClient = new FetchHttpClient();
|
||||
it("should throw for awaited 404", async () => {
|
||||
const request = new HttpRequest(HttpMethod.GET, "http://www.notanexample.coms", {});
|
||||
const httpClient = new FetchHttpClient();
|
||||
|
||||
try {
|
||||
await httpClient.send(request)
|
||||
assert.fail("Expected error to be thrown.");
|
||||
} catch (error) {
|
||||
assert.strictEqual(error.name, "FetchError");
|
||||
assert.strictEqual(error.code, "ENOTFOUND");
|
||||
assert.strictEqual(error.message, "request to http://www.notanexample.coms failed, reason: getaddrinfo ENOTFOUND www.notanexample.coms www.notanexample.coms:80");
|
||||
}
|
||||
});
|
||||
try {
|
||||
await httpClient.send(request);
|
||||
assert.fail("Expected error to be thrown.");
|
||||
} catch (error) {
|
||||
assert.strictEqual(error.name, "FetchError");
|
||||
assert.strictEqual(error.code, "ENOTFOUND");
|
||||
assert.strictEqual(error.message, "request to http://www.notanexample.coms failed, reason: getaddrinfo ENOTFOUND www.notanexample.coms www.notanexample.coms:80");
|
||||
}
|
||||
});
|
||||
|
||||
it("should reject for promised 404", async () => {
|
||||
const request = new HttpRequest(HttpMethod.GET, "http://www.notanexample.coms", {});
|
||||
const httpClient = new FetchHttpClient();
|
||||
it("should reject for promised 404", async () => {
|
||||
const request = new HttpRequest(HttpMethod.GET, "http://www.notanexample.coms", {});
|
||||
const httpClient = new FetchHttpClient();
|
||||
|
||||
return httpClient.send(request)
|
||||
.then(() => {
|
||||
assert.fail("Expected error to be thrown.");
|
||||
})
|
||||
.catch((error: any) => {
|
||||
assert.strictEqual(error.name, "FetchError");
|
||||
assert.strictEqual(error.code, "ENOTFOUND");
|
||||
assert.strictEqual(error.message, "request to http://www.notanexample.coms failed, reason: getaddrinfo ENOTFOUND www.notanexample.coms www.notanexample.coms:80");
|
||||
});
|
||||
});
|
||||
return httpClient.send(request)
|
||||
.then(() => {
|
||||
assert.fail("Expected error to be thrown.");
|
||||
})
|
||||
.catch((error: any) => {
|
||||
assert.strictEqual(error.name, "FetchError");
|
||||
assert.strictEqual(error.code, "ENOTFOUND");
|
||||
assert.strictEqual(error.message, "request to http://www.notanexample.coms failed, reason: getaddrinfo ENOTFOUND www.notanexample.coms www.notanexample.coms:80");
|
||||
});
|
||||
});
|
||||
});
|
|
@ -12,68 +12,68 @@ import { BaseRequestPolicy } from "../lib/requestPolicy";
|
|||
import { FakeHttpClient } from "./fakeHttpClient";
|
||||
|
||||
describe("HttpPipeline", () => {
|
||||
it("should send requests when no request policies are assigned", async () => {
|
||||
const httpClient: HttpClient = new FakeHttpClient((request: HttpRequest) => {
|
||||
return Promise.resolve(new InMemoryHttpResponse(request, 200, {}, "hello"));
|
||||
});
|
||||
|
||||
const httpPipeline = new HttpPipeline([], { httpClient: httpClient });
|
||||
|
||||
const httpRequest = new HttpRequest(HttpMethod.GET, "http://www.example.com", {});
|
||||
const response: HttpResponse = await httpPipeline.send(httpRequest);
|
||||
assert.deepStrictEqual(response.request, httpRequest);
|
||||
assert.strictEqual(response.statusCode, 200);
|
||||
assert.deepStrictEqual(response.headers.toJson(), {});
|
||||
|
||||
const responseBodyAsText: string | undefined = await response.textBody();
|
||||
assert.strictEqual("hello", responseBodyAsText);
|
||||
it("should send requests when no request policies are assigned", async () => {
|
||||
const httpClient: HttpClient = new FakeHttpClient((request: HttpRequest) => {
|
||||
return Promise.resolve(new InMemoryHttpResponse(request, 200, {}, "hello"));
|
||||
});
|
||||
|
||||
it("should send requests when request-modifying request policies are assigned", async () => {
|
||||
const httpClient: HttpClient = new FakeHttpClient((request: HttpRequest) => {
|
||||
assert.deepStrictEqual(request.headers.toJson(), { "User-Agent": "my user agent string" });
|
||||
return Promise.resolve(new InMemoryHttpResponse(request, 200, {}, "hello2"));
|
||||
});
|
||||
const httpPipeline = new HttpPipeline([], { httpClient: httpClient });
|
||||
|
||||
const httpPipeline = new HttpPipeline(
|
||||
[ userAgentPolicy("my user agent string") ],
|
||||
{ httpClient: httpClient });
|
||||
const httpRequest = new HttpRequest(HttpMethod.GET, "http://www.example.com", {});
|
||||
const response: HttpResponse = await httpPipeline.send(httpRequest);
|
||||
assert.deepStrictEqual(response.request, httpRequest);
|
||||
assert.strictEqual(response.statusCode, 200);
|
||||
assert.deepStrictEqual(response.headers.toJson(), {});
|
||||
|
||||
const httpRequest = new HttpRequest(HttpMethod.GET, "http://www.example.com", {});
|
||||
const response: HttpResponse = await httpPipeline.send(httpRequest);
|
||||
assert.deepStrictEqual(response.request, httpRequest);
|
||||
assert.deepStrictEqual(response.request.headers.toJson(), { "User-Agent": "my user agent string" });
|
||||
assert.strictEqual(response.statusCode, 200);
|
||||
assert.deepStrictEqual(response.headers.toJson(), {});
|
||||
const responseBodyAsText: string | undefined = await response.textBody();
|
||||
assert.strictEqual("hello2", responseBodyAsText);
|
||||
const responseBodyAsText: string | undefined = await response.textBody();
|
||||
assert.strictEqual("hello", responseBodyAsText);
|
||||
});
|
||||
|
||||
it("should send requests when request-modifying request policies are assigned", async () => {
|
||||
const httpClient: HttpClient = new FakeHttpClient((request: HttpRequest) => {
|
||||
assert.deepStrictEqual(request.headers.toJson(), { "User-Agent": "my user agent string" });
|
||||
return Promise.resolve(new InMemoryHttpResponse(request, 200, {}, "hello2"));
|
||||
});
|
||||
|
||||
it("should send requests when response-modifying request policies are assigned", async () => {
|
||||
const httpClient: HttpClient = new FakeHttpClient((request: HttpRequest) => {
|
||||
assert.deepStrictEqual(request.headers.toJson(), {});
|
||||
return Promise.resolve(new InMemoryHttpResponse(request, 200, {}, "hello3"));
|
||||
});
|
||||
const httpPipeline = new HttpPipeline(
|
||||
[userAgentPolicy("my user agent string")],
|
||||
{ httpClient: httpClient });
|
||||
|
||||
class ResponseModifyingRequestPolicy extends BaseRequestPolicy {
|
||||
public async send(request: HttpRequest): Promise<HttpResponse> {
|
||||
const response: HttpResponse = await this._nextPolicy.send(request);
|
||||
response.headers.set("My-Header", "My-Value");
|
||||
return response;
|
||||
}
|
||||
}
|
||||
const httpRequest = new HttpRequest(HttpMethod.GET, "http://www.example.com", {});
|
||||
const response: HttpResponse = await httpPipeline.send(httpRequest);
|
||||
assert.deepStrictEqual(response.request, httpRequest);
|
||||
assert.deepStrictEqual(response.request.headers.toJson(), { "User-Agent": "my user agent string" });
|
||||
assert.strictEqual(response.statusCode, 200);
|
||||
assert.deepStrictEqual(response.headers.toJson(), {});
|
||||
const responseBodyAsText: string | undefined = await response.textBody();
|
||||
assert.strictEqual("hello2", responseBodyAsText);
|
||||
});
|
||||
|
||||
const httpPipeline = new HttpPipeline(
|
||||
[ (nextPolicy, options) => new ResponseModifyingRequestPolicy(nextPolicy, options) ],
|
||||
{ httpClient: httpClient });
|
||||
|
||||
const httpRequest = new HttpRequest(HttpMethod.GET, "http://www.example.com", {});
|
||||
const response: HttpResponse = await httpPipeline.send(httpRequest);
|
||||
assert.deepStrictEqual(response.request, httpRequest);
|
||||
assert.deepStrictEqual(response.request.headers.toJson(), {});
|
||||
assert.strictEqual(response.statusCode, 200);
|
||||
assert.deepStrictEqual(response.headers.toJson(), {"My-Header": "My-Value"});
|
||||
const responseBodyAsText: string | undefined = await response.textBody();
|
||||
assert.strictEqual("hello3", responseBodyAsText);
|
||||
it("should send requests when response-modifying request policies are assigned", async () => {
|
||||
const httpClient: HttpClient = new FakeHttpClient((request: HttpRequest) => {
|
||||
assert.deepStrictEqual(request.headers.toJson(), {});
|
||||
return Promise.resolve(new InMemoryHttpResponse(request, 200, {}, "hello3"));
|
||||
});
|
||||
|
||||
class ResponseModifyingRequestPolicy extends BaseRequestPolicy {
|
||||
public async send(request: HttpRequest): Promise<HttpResponse> {
|
||||
const response: HttpResponse = await this._nextPolicy.send(request);
|
||||
response.headers.set("My-Header", "My-Value");
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
const httpPipeline = new HttpPipeline(
|
||||
[(nextPolicy, options) => new ResponseModifyingRequestPolicy(nextPolicy, options)],
|
||||
{ httpClient: httpClient });
|
||||
|
||||
const httpRequest = new HttpRequest(HttpMethod.GET, "http://www.example.com", {});
|
||||
const response: HttpResponse = await httpPipeline.send(httpRequest);
|
||||
assert.deepStrictEqual(response.request, httpRequest);
|
||||
assert.deepStrictEqual(response.request.headers.toJson(), {});
|
||||
assert.strictEqual(response.statusCode, 200);
|
||||
assert.deepStrictEqual(response.headers.toJson(), { "My-Header": "My-Value" });
|
||||
const responseBodyAsText: string | undefined = await response.textBody();
|
||||
assert.strictEqual("hello3", responseBodyAsText);
|
||||
});
|
||||
});
|
|
@ -5,47 +5,47 @@ import { HttpMethod } from "../lib/httpMethod";
|
|||
import { HttpRequest } from "../lib/httpRequest";
|
||||
|
||||
describe("HttpRequest", () => {
|
||||
describe("constructor", () => {
|
||||
it(`should throw an Error when the url is ""`, () => {
|
||||
try {
|
||||
new HttpRequest(HttpMethod.GET, "", {});
|
||||
assert.fail("Should have thrown an error.");
|
||||
} catch (error) {
|
||||
assert.notEqual(error, null);
|
||||
assert.strictEqual(error.message, `"" is not a valid URL for a HttpRequest.`);
|
||||
}
|
||||
});
|
||||
|
||||
it(`should return a valid GET HttpRequest when the url is "www.example.com"`, () => {
|
||||
const httpRequest: HttpRequest = new HttpRequest(HttpMethod.GET, "www.example.com", {});
|
||||
assert.strictEqual(httpRequest.httpMethod, HttpMethod.GET);
|
||||
assert.strictEqual(httpRequest.url, "www.example.com");
|
||||
assert.deepStrictEqual(httpRequest.headers.toJson(), {});
|
||||
assert.strictEqual(httpRequest.body, undefined);
|
||||
});
|
||||
|
||||
it(`should return a valid POST HttpRequest when the body is undefined`, () => {
|
||||
const httpRequest: HttpRequest = new HttpRequest(HttpMethod.POST, "www.example.com", {});
|
||||
assert.strictEqual(httpRequest.httpMethod, HttpMethod.POST);
|
||||
assert.strictEqual(httpRequest.url, "www.example.com");
|
||||
assert.deepStrictEqual(httpRequest.headers.toJson(), {});
|
||||
assert.strictEqual(httpRequest.body, undefined);
|
||||
});
|
||||
|
||||
it(`should return a valid POST HttpRequest when the body is ""`, () => {
|
||||
const httpRequest: HttpRequest = new HttpRequest(HttpMethod.POST, "www.example.com", {}, "");
|
||||
assert.strictEqual(httpRequest.httpMethod, HttpMethod.POST);
|
||||
assert.strictEqual(httpRequest.url, "www.example.com");
|
||||
assert.deepStrictEqual(httpRequest.headers.toJson(), {});
|
||||
assert.strictEqual(httpRequest.body, "");
|
||||
});
|
||||
|
||||
it(`should return a valid POST HttpRequest when the body is "hello"`, () => {
|
||||
const httpRequest: HttpRequest = new HttpRequest(HttpMethod.POST, "www.example.com", {"Content-Length": "5"}, "hello");
|
||||
assert.strictEqual(httpRequest.httpMethod, HttpMethod.POST);
|
||||
assert.strictEqual(httpRequest.url, "www.example.com");
|
||||
assert.deepStrictEqual(httpRequest.headers.toJson(), {"Content-Length": "5"});
|
||||
assert.strictEqual(httpRequest.body, "hello");
|
||||
});
|
||||
describe("constructor", () => {
|
||||
it(`should throw an Error when the url is ""`, () => {
|
||||
try {
|
||||
new HttpRequest(HttpMethod.GET, "", {});
|
||||
assert.fail("Should have thrown an error.");
|
||||
} catch (error) {
|
||||
assert.notEqual(error, null);
|
||||
assert.strictEqual(error.message, `"" is not a valid URL for a HttpRequest.`);
|
||||
}
|
||||
});
|
||||
|
||||
it(`should return a valid GET HttpRequest when the url is "www.example.com"`, () => {
|
||||
const httpRequest: HttpRequest = new HttpRequest(HttpMethod.GET, "www.example.com", {});
|
||||
assert.strictEqual(httpRequest.httpMethod, HttpMethod.GET);
|
||||
assert.strictEqual(httpRequest.url, "www.example.com");
|
||||
assert.deepStrictEqual(httpRequest.headers.toJson(), {});
|
||||
assert.strictEqual(httpRequest.body, undefined);
|
||||
});
|
||||
|
||||
it(`should return a valid POST HttpRequest when the body is undefined`, () => {
|
||||
const httpRequest: HttpRequest = new HttpRequest(HttpMethod.POST, "www.example.com", {});
|
||||
assert.strictEqual(httpRequest.httpMethod, HttpMethod.POST);
|
||||
assert.strictEqual(httpRequest.url, "www.example.com");
|
||||
assert.deepStrictEqual(httpRequest.headers.toJson(), {});
|
||||
assert.strictEqual(httpRequest.body, undefined);
|
||||
});
|
||||
|
||||
it(`should return a valid POST HttpRequest when the body is ""`, () => {
|
||||
const httpRequest: HttpRequest = new HttpRequest(HttpMethod.POST, "www.example.com", {}, "");
|
||||
assert.strictEqual(httpRequest.httpMethod, HttpMethod.POST);
|
||||
assert.strictEqual(httpRequest.url, "www.example.com");
|
||||
assert.deepStrictEqual(httpRequest.headers.toJson(), {});
|
||||
assert.strictEqual(httpRequest.body, "");
|
||||
});
|
||||
|
||||
it(`should return a valid POST HttpRequest when the body is "hello"`, () => {
|
||||
const httpRequest: HttpRequest = new HttpRequest(HttpMethod.POST, "www.example.com", { "Content-Length": "5" }, "hello");
|
||||
assert.strictEqual(httpRequest.httpMethod, HttpMethod.POST);
|
||||
assert.strictEqual(httpRequest.url, "www.example.com");
|
||||
assert.deepStrictEqual(httpRequest.headers.toJson(), { "Content-Length": "5" });
|
||||
assert.strictEqual(httpRequest.body, "hello");
|
||||
});
|
||||
});
|
||||
});
|
|
@ -7,28 +7,28 @@ import { HttpPipelineLogger } from "../lib/httpPipelineLogger";
|
|||
* An in-memory HttpPipelineLogger that can be used for testing.
|
||||
*/
|
||||
export class InMemoryHttpPipelineLogger implements HttpPipelineLogger {
|
||||
private readonly _logs: string[];
|
||||
private readonly _logs: string[];
|
||||
|
||||
constructor(private _minimumLogLevel: HttpPipelineLogLevel = HttpPipelineLogLevel.INFO) {
|
||||
this._logs = [];
|
||||
}
|
||||
constructor(private _minimumLogLevel: HttpPipelineLogLevel = HttpPipelineLogLevel.INFO) {
|
||||
this._logs = [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the logs that have been written to this HttpPipelineLogger.
|
||||
*/
|
||||
public get logs(): string[] {
|
||||
return this._logs;
|
||||
}
|
||||
/**
|
||||
* Get the logs that have been written to this HttpPipelineLogger.
|
||||
*/
|
||||
public get logs(): string[] {
|
||||
return this._logs;
|
||||
}
|
||||
|
||||
public get minimumLogLevel(): HttpPipelineLogLevel {
|
||||
return this._minimumLogLevel;
|
||||
}
|
||||
public get minimumLogLevel(): HttpPipelineLogLevel {
|
||||
return this._minimumLogLevel;
|
||||
}
|
||||
|
||||
public set minimumLogLevel(minimumLogLevel: HttpPipelineLogLevel) {
|
||||
this._minimumLogLevel = minimumLogLevel;
|
||||
}
|
||||
public set minimumLogLevel(minimumLogLevel: HttpPipelineLogLevel) {
|
||||
this._minimumLogLevel = minimumLogLevel;
|
||||
}
|
||||
|
||||
public log(logLevel: HttpPipelineLogLevel, message: string): void {
|
||||
this._logs.push(`${HttpPipelineLogLevel[logLevel]}: ${message}`);
|
||||
}
|
||||
public log(logLevel: HttpPipelineLogLevel, message: string): void {
|
||||
this._logs.push(`${HttpPipelineLogLevel[logLevel]}: ${message}`);
|
||||
}
|
||||
}
|
|
@ -6,45 +6,45 @@ import * as assert from "assert";
|
|||
import { HttpPipelineLogLevel } from "../lib/httpPipelineLogLevel";
|
||||
|
||||
describe("InMemoryHttpPipelineLogger", () => {
|
||||
it("should store logs", () => {
|
||||
const logger = new InMemoryHttpPipelineLogger();
|
||||
assert.deepStrictEqual(logger.logs, []);
|
||||
it("should store logs", () => {
|
||||
const logger = new InMemoryHttpPipelineLogger();
|
||||
assert.deepStrictEqual(logger.logs, []);
|
||||
|
||||
logger.log(HttpPipelineLogLevel.INFO, "Message 1");
|
||||
assert.deepStrictEqual(logger.logs, [
|
||||
"INFO: Message 1"
|
||||
]);
|
||||
logger.log(HttpPipelineLogLevel.INFO, "Message 1");
|
||||
assert.deepStrictEqual(logger.logs, [
|
||||
"INFO: Message 1"
|
||||
]);
|
||||
|
||||
logger.log(HttpPipelineLogLevel.WARNING, "Message 2");
|
||||
assert.deepStrictEqual(logger.logs, [
|
||||
"INFO: Message 1",
|
||||
"WARNING: Message 2"
|
||||
]);
|
||||
logger.log(HttpPipelineLogLevel.WARNING, "Message 2");
|
||||
assert.deepStrictEqual(logger.logs, [
|
||||
"INFO: Message 1",
|
||||
"WARNING: Message 2"
|
||||
]);
|
||||
|
||||
logger.log(HttpPipelineLogLevel.ERROR, "Message 3");
|
||||
assert.deepStrictEqual(logger.logs, [
|
||||
"INFO: Message 1",
|
||||
"WARNING: Message 2",
|
||||
"ERROR: Message 3"
|
||||
]);
|
||||
logger.log(HttpPipelineLogLevel.ERROR, "Message 3");
|
||||
assert.deepStrictEqual(logger.logs, [
|
||||
"INFO: Message 1",
|
||||
"WARNING: Message 2",
|
||||
"ERROR: Message 3"
|
||||
]);
|
||||
|
||||
logger.log(HttpPipelineLogLevel.OFF, "Message 4");
|
||||
assert.deepStrictEqual(logger.logs, [
|
||||
"INFO: Message 1",
|
||||
"WARNING: Message 2",
|
||||
"ERROR: Message 3",
|
||||
"OFF: Message 4"
|
||||
]);
|
||||
});
|
||||
logger.log(HttpPipelineLogLevel.OFF, "Message 4");
|
||||
assert.deepStrictEqual(logger.logs, [
|
||||
"INFO: Message 1",
|
||||
"WARNING: Message 2",
|
||||
"ERROR: Message 3",
|
||||
"OFF: Message 4"
|
||||
]);
|
||||
});
|
||||
|
||||
it("should update the minimumLogLevel", () => {
|
||||
const logger = new InMemoryHttpPipelineLogger();
|
||||
assert.strictEqual(logger.minimumLogLevel, HttpPipelineLogLevel.INFO);
|
||||
it("should update the minimumLogLevel", () => {
|
||||
const logger = new InMemoryHttpPipelineLogger();
|
||||
assert.strictEqual(logger.minimumLogLevel, HttpPipelineLogLevel.INFO);
|
||||
|
||||
logger.minimumLogLevel = HttpPipelineLogLevel.OFF;
|
||||
assert.strictEqual(logger.minimumLogLevel, HttpPipelineLogLevel.OFF);
|
||||
logger.minimumLogLevel = HttpPipelineLogLevel.OFF;
|
||||
assert.strictEqual(logger.minimumLogLevel, HttpPipelineLogLevel.OFF);
|
||||
|
||||
logger.minimumLogLevel = HttpPipelineLogLevel.ERROR;
|
||||
assert.strictEqual(logger.minimumLogLevel, HttpPipelineLogLevel.ERROR);
|
||||
});
|
||||
logger.minimumLogLevel = HttpPipelineLogLevel.ERROR;
|
||||
assert.strictEqual(logger.minimumLogLevel, HttpPipelineLogLevel.ERROR);
|
||||
});
|
||||
});
|
|
@ -11,57 +11,57 @@ import { RequestPolicyFactory } from "../../lib/requestPolicyFactory";
|
|||
import { RequestPolicyOptions } from "../../lib/requestPolicyOptions";
|
||||
|
||||
describe("exponentialRetryPolicy", () => {
|
||||
it("should do nothing if no error occurs", async () => {
|
||||
const policyFactory: RequestPolicyFactory = exponentialRetryPolicy({
|
||||
maximumAttempts: 3,
|
||||
initialRetryDelayInMilliseconds: 100,
|
||||
maximumRetryIntervalInMilliseconds: 1000
|
||||
});
|
||||
|
||||
const nextPolicy: RequestPolicy = {
|
||||
send: (request: HttpRequest) => {
|
||||
request.headers.set("A", "B");
|
||||
return Promise.resolve(new InMemoryHttpResponse(request, 200, {}));
|
||||
}
|
||||
};
|
||||
|
||||
const policy: RequestPolicy = policyFactory(nextPolicy, new RequestPolicyOptions());
|
||||
const request = new HttpRequest(HttpMethod.GET, "https://spam.com", {});
|
||||
const response: HttpResponse = await policy.send(request);
|
||||
|
||||
assert.deepStrictEqual(request, new HttpRequest(HttpMethod.GET, "https://spam.com", {}), "The original request should not be modified.");
|
||||
assert.deepStrictEqual(response.request, new HttpRequest(HttpMethod.GET, "https://spam.com", { "A": "B" }), "The request associated with the response should have the modified header.");
|
||||
it("should do nothing if no error occurs", async () => {
|
||||
const policyFactory: RequestPolicyFactory = exponentialRetryPolicy({
|
||||
maximumAttempts: 3,
|
||||
initialRetryDelayInMilliseconds: 100,
|
||||
maximumRetryIntervalInMilliseconds: 1000
|
||||
});
|
||||
|
||||
it("should retry if an undefined HttpResponse is returned", async () => {
|
||||
let millisecondsDelayed = 0;
|
||||
const nextPolicy: RequestPolicy = {
|
||||
send: (request: HttpRequest) => {
|
||||
request.headers.set("A", "B");
|
||||
return Promise.resolve(new InMemoryHttpResponse(request, 200, {}));
|
||||
}
|
||||
};
|
||||
|
||||
const policyFactory: RequestPolicyFactory = exponentialRetryPolicy({
|
||||
maximumAttempts: 3,
|
||||
initialRetryDelayInMilliseconds: 30 * 1000,
|
||||
maximumRetryIntervalInMilliseconds: 90 * 1000,
|
||||
delayFunction: (delayInMilliseconds: number) => {
|
||||
millisecondsDelayed += delayInMilliseconds;
|
||||
return Promise.resolve();
|
||||
}
|
||||
});
|
||||
const policy: RequestPolicy = policyFactory(nextPolicy, new RequestPolicyOptions());
|
||||
const request = new HttpRequest(HttpMethod.GET, "https://spam.com", {});
|
||||
const response: HttpResponse = await policy.send(request);
|
||||
|
||||
let attempt = 0;
|
||||
assert.deepStrictEqual(request, new HttpRequest(HttpMethod.GET, "https://spam.com", {}), "The original request should not be modified.");
|
||||
assert.deepStrictEqual(response.request, new HttpRequest(HttpMethod.GET, "https://spam.com", { "A": "B" }), "The request associated with the response should have the modified header.");
|
||||
});
|
||||
|
||||
const nextPolicy: RequestPolicy = {
|
||||
send: (request: HttpRequest) => {
|
||||
++attempt;
|
||||
request.headers.set("A", attempt);
|
||||
return Promise.resolve(attempt === 1 ? <any>undefined : new InMemoryHttpResponse(request, 200, {}));
|
||||
}
|
||||
};
|
||||
it("should retry if an undefined HttpResponse is returned", async () => {
|
||||
let millisecondsDelayed = 0;
|
||||
|
||||
const policy: RequestPolicy = policyFactory(nextPolicy, new RequestPolicyOptions());
|
||||
const request = new HttpRequest(HttpMethod.GET, "https://spam.com", {});
|
||||
const response: HttpResponse = await policy.send(request);
|
||||
|
||||
assert.deepStrictEqual(request, new HttpRequest(HttpMethod.GET, "https://spam.com", {}), "The original request should not be modified.");
|
||||
assert.deepStrictEqual(response.request, new HttpRequest(HttpMethod.GET, "https://spam.com", { "A": "2" }), "The request associated with the response should have the modified header.");
|
||||
assert.strictEqual(millisecondsDelayed, 30 * 1000);
|
||||
const policyFactory: RequestPolicyFactory = exponentialRetryPolicy({
|
||||
maximumAttempts: 3,
|
||||
initialRetryDelayInMilliseconds: 30 * 1000,
|
||||
maximumRetryIntervalInMilliseconds: 90 * 1000,
|
||||
delayFunction: (delayInMilliseconds: number) => {
|
||||
millisecondsDelayed += delayInMilliseconds;
|
||||
return Promise.resolve();
|
||||
}
|
||||
});
|
||||
|
||||
let attempt = 0;
|
||||
|
||||
const nextPolicy: RequestPolicy = {
|
||||
send: (request: HttpRequest) => {
|
||||
++attempt;
|
||||
request.headers.set("A", attempt);
|
||||
return Promise.resolve(attempt === 1 ? <any>undefined : new InMemoryHttpResponse(request, 200, {}));
|
||||
}
|
||||
};
|
||||
|
||||
const policy: RequestPolicy = policyFactory(nextPolicy, new RequestPolicyOptions());
|
||||
const request = new HttpRequest(HttpMethod.GET, "https://spam.com", {});
|
||||
const response: HttpResponse = await policy.send(request);
|
||||
|
||||
assert.deepStrictEqual(request, new HttpRequest(HttpMethod.GET, "https://spam.com", {}), "The original request should not be modified.");
|
||||
assert.deepStrictEqual(response.request, new HttpRequest(HttpMethod.GET, "https://spam.com", { "A": "2" }), "The request associated with the response should have the modified header.");
|
||||
assert.strictEqual(millisecondsDelayed, 30 * 1000);
|
||||
});
|
||||
});
|
|
@ -12,29 +12,29 @@ import { RequestPolicyOptions } from "../../lib/requestPolicyOptions";
|
|||
import { HttpHeaders } from "../../lib/httpHeaders";
|
||||
|
||||
describe("logPolicy", () => {
|
||||
it("logs requests and responses with no body", async () => {
|
||||
const logs: string[] = [];
|
||||
const policyFactory: RequestPolicyFactory = logPolicy((message: string) => logs.push(message));
|
||||
it("logs requests and responses with no body", async () => {
|
||||
const logs: string[] = [];
|
||||
const policyFactory: RequestPolicyFactory = logPolicy((message: string) => logs.push(message));
|
||||
|
||||
const nextPolicy: RequestPolicy = {
|
||||
send: (request: HttpRequest) => {
|
||||
return Promise.resolve(new InMemoryHttpResponse(request, 200, {}));
|
||||
}
|
||||
};
|
||||
const nextPolicy: RequestPolicy = {
|
||||
send: (request: HttpRequest) => {
|
||||
return Promise.resolve(new InMemoryHttpResponse(request, 200, {}));
|
||||
}
|
||||
};
|
||||
|
||||
const policy: RequestPolicy = policyFactory(nextPolicy, new RequestPolicyOptions());
|
||||
const request = new HttpRequest(HttpMethod.GET, "https://spam.com", {});
|
||||
const response: HttpResponse = await policy.send(request);
|
||||
const policy: RequestPolicy = policyFactory(nextPolicy, new RequestPolicyOptions());
|
||||
const request = new HttpRequest(HttpMethod.GET, "https://spam.com", {});
|
||||
const response: HttpResponse = await policy.send(request);
|
||||
|
||||
assert.deepStrictEqual(request, new HttpRequest(HttpMethod.GET, "https://spam.com", {}));
|
||||
assert.deepStrictEqual(response.request, new HttpRequest(HttpMethod.GET, "https://spam.com", {}));
|
||||
assert.deepStrictEqual(response.statusCode, 200);
|
||||
assert.deepStrictEqual(response.headers, new HttpHeaders());
|
||||
assert.deepStrictEqual(request, new HttpRequest(HttpMethod.GET, "https://spam.com", {}));
|
||||
assert.deepStrictEqual(response.request, new HttpRequest(HttpMethod.GET, "https://spam.com", {}));
|
||||
assert.deepStrictEqual(response.statusCode, 200);
|
||||
assert.deepStrictEqual(response.headers, new HttpHeaders());
|
||||
|
||||
assert.deepStrictEqual(logs, [
|
||||
">> Request: {\n \"httpMethod\": \"GET\",\n \"url\": \"https://spam.com\",\n \"_headers\": {\n \"_headersMap\": {}\n }\n}",
|
||||
">> Response Status Code: 200",
|
||||
">> Response Body: undefined"
|
||||
]);
|
||||
});
|
||||
assert.deepStrictEqual(logs, [
|
||||
">> Request: {\n \"httpMethod\": \"GET\",\n \"url\": \"https://spam.com\",\n \"_headers\": {\n \"_headersMap\": {}\n }\n}",
|
||||
">> Response Status Code: 200",
|
||||
">> Response Body: undefined"
|
||||
]);
|
||||
});
|
||||
});
|
|
@ -11,20 +11,20 @@ import { RequestPolicyFactory } from "../../lib/requestPolicyFactory";
|
|||
import { RequestPolicyOptions } from "../../lib/requestPolicyOptions";
|
||||
|
||||
describe("userAgentPolicy", () => {
|
||||
it("assigns the 'User-Agent' header to requests and does nothing to responses", async () => {
|
||||
const policyFactory: RequestPolicyFactory = userAgentPolicy("my-user-agent-string");
|
||||
it("assigns the 'User-Agent' header to requests and does nothing to responses", async () => {
|
||||
const policyFactory: RequestPolicyFactory = userAgentPolicy("my-user-agent-string");
|
||||
|
||||
const nextPolicy: RequestPolicy = {
|
||||
send: (request: HttpRequest) => {
|
||||
return Promise.resolve(new InMemoryHttpResponse(request, 200, {}));
|
||||
}
|
||||
}
|
||||
const nextPolicy: RequestPolicy = {
|
||||
send: (request: HttpRequest) => {
|
||||
return Promise.resolve(new InMemoryHttpResponse(request, 200, {}));
|
||||
}
|
||||
};
|
||||
|
||||
const policy: RequestPolicy = policyFactory(nextPolicy, new RequestPolicyOptions());
|
||||
const request = new HttpRequest(HttpMethod.GET, "https://spam.com", {});
|
||||
const response: HttpResponse = await policy.send(request);
|
||||
const policy: RequestPolicy = policyFactory(nextPolicy, new RequestPolicyOptions());
|
||||
const request = new HttpRequest(HttpMethod.GET, "https://spam.com", {});
|
||||
const response: HttpResponse = await policy.send(request);
|
||||
|
||||
assert.deepStrictEqual(request, new HttpRequest(HttpMethod.GET, "https://spam.com", {"User-Agent": "my-user-agent-string"}));
|
||||
assert.deepStrictEqual(response.request, new HttpRequest(HttpMethod.GET, "https://spam.com", {"User-Agent": "my-user-agent-string"}));
|
||||
});
|
||||
assert.deepStrictEqual(request, new HttpRequest(HttpMethod.GET, "https://spam.com", { "User-Agent": "my-user-agent-string" }));
|
||||
assert.deepStrictEqual(response.request, new HttpRequest(HttpMethod.GET, "https://spam.com", { "User-Agent": "my-user-agent-string" }));
|
||||
});
|
||||
});
|
|
@ -7,143 +7,143 @@ import { InMemoryHttpPipelineLogger } from "./inMemoryHttpPipelineLogger";
|
|||
import { HttpPipelineLogLevel } from "../lib/httpPipelineLogLevel";
|
||||
|
||||
describe("RequestPolicyOptions", () => {
|
||||
describe("shouldLog()", () => {
|
||||
it("should return false when the logger is undefined", () => {
|
||||
const requestPolicyOptions = new RequestPolicyOptions(undefined);
|
||||
assert.strictEqual(requestPolicyOptions.shouldLog(HttpPipelineLogLevel.OFF), false);
|
||||
assert.strictEqual(requestPolicyOptions.shouldLog(HttpPipelineLogLevel.INFO), false);
|
||||
assert.strictEqual(requestPolicyOptions.shouldLog(HttpPipelineLogLevel.WARNING), false);
|
||||
assert.strictEqual(requestPolicyOptions.shouldLog(HttpPipelineLogLevel.ERROR), false);
|
||||
});
|
||||
|
||||
it("should return false when the minimumLogLevel is OFF", () => {
|
||||
const logger = new InMemoryHttpPipelineLogger(HttpPipelineLogLevel.OFF);
|
||||
const requestPolicyOptions = new RequestPolicyOptions(logger);
|
||||
assert.strictEqual(requestPolicyOptions.shouldLog(HttpPipelineLogLevel.OFF), false);
|
||||
assert.strictEqual(requestPolicyOptions.shouldLog(HttpPipelineLogLevel.INFO), false);
|
||||
assert.strictEqual(requestPolicyOptions.shouldLog(HttpPipelineLogLevel.WARNING), false);
|
||||
assert.strictEqual(requestPolicyOptions.shouldLog(HttpPipelineLogLevel.ERROR), false);
|
||||
});
|
||||
|
||||
it("should return false when the minimumLogLevel is INFO", () => {
|
||||
const logger = new InMemoryHttpPipelineLogger(HttpPipelineLogLevel.INFO);
|
||||
const requestPolicyOptions = new RequestPolicyOptions(logger);
|
||||
assert.strictEqual(requestPolicyOptions.shouldLog(HttpPipelineLogLevel.OFF), false);
|
||||
assert.strictEqual(requestPolicyOptions.shouldLog(HttpPipelineLogLevel.INFO), true);
|
||||
assert.strictEqual(requestPolicyOptions.shouldLog(HttpPipelineLogLevel.WARNING), true);
|
||||
assert.strictEqual(requestPolicyOptions.shouldLog(HttpPipelineLogLevel.ERROR), true);
|
||||
});
|
||||
|
||||
it("should return false when the minimumLogLevel is WARNING", () => {
|
||||
const logger = new InMemoryHttpPipelineLogger(HttpPipelineLogLevel.WARNING);
|
||||
const requestPolicyOptions = new RequestPolicyOptions(logger);
|
||||
assert.strictEqual(requestPolicyOptions.shouldLog(HttpPipelineLogLevel.OFF), false);
|
||||
assert.strictEqual(requestPolicyOptions.shouldLog(HttpPipelineLogLevel.INFO), false);
|
||||
assert.strictEqual(requestPolicyOptions.shouldLog(HttpPipelineLogLevel.WARNING), true);
|
||||
assert.strictEqual(requestPolicyOptions.shouldLog(HttpPipelineLogLevel.ERROR), true);
|
||||
});
|
||||
|
||||
it("should return false when the minimumLogLevel is ERROR", () => {
|
||||
const logger = new InMemoryHttpPipelineLogger(HttpPipelineLogLevel.ERROR);
|
||||
const requestPolicyOptions = new RequestPolicyOptions(logger);
|
||||
assert.strictEqual(requestPolicyOptions.shouldLog(HttpPipelineLogLevel.OFF), false);
|
||||
assert.strictEqual(requestPolicyOptions.shouldLog(HttpPipelineLogLevel.INFO), false);
|
||||
assert.strictEqual(requestPolicyOptions.shouldLog(HttpPipelineLogLevel.WARNING), false);
|
||||
assert.strictEqual(requestPolicyOptions.shouldLog(HttpPipelineLogLevel.ERROR), true);
|
||||
});
|
||||
describe("shouldLog()", () => {
|
||||
it("should return false when the logger is undefined", () => {
|
||||
const requestPolicyOptions = new RequestPolicyOptions(undefined);
|
||||
assert.strictEqual(requestPolicyOptions.shouldLog(HttpPipelineLogLevel.OFF), false);
|
||||
assert.strictEqual(requestPolicyOptions.shouldLog(HttpPipelineLogLevel.INFO), false);
|
||||
assert.strictEqual(requestPolicyOptions.shouldLog(HttpPipelineLogLevel.WARNING), false);
|
||||
assert.strictEqual(requestPolicyOptions.shouldLog(HttpPipelineLogLevel.ERROR), false);
|
||||
});
|
||||
|
||||
describe("log()", () => {
|
||||
it("should not log when the logger is undefined", () => {
|
||||
const requestPolicyOptions = new RequestPolicyOptions(undefined);
|
||||
requestPolicyOptions.log(HttpPipelineLogLevel.OFF, "Message 1");
|
||||
requestPolicyOptions.log(HttpPipelineLogLevel.INFO, "Message 2");
|
||||
requestPolicyOptions.log(HttpPipelineLogLevel.WARNING, "Message 3");
|
||||
requestPolicyOptions.log(HttpPipelineLogLevel.ERROR, "Message 4");
|
||||
});
|
||||
|
||||
it("should not log when the minimumLogLevel is OFF", () => {
|
||||
const logger = new InMemoryHttpPipelineLogger(HttpPipelineLogLevel.OFF);
|
||||
const requestPolicyOptions = new RequestPolicyOptions(logger);
|
||||
|
||||
requestPolicyOptions.log(HttpPipelineLogLevel.OFF, "Message 1");
|
||||
assert.deepStrictEqual(logger.logs, []);
|
||||
|
||||
requestPolicyOptions.log(HttpPipelineLogLevel.INFO, "Message 2");
|
||||
assert.deepStrictEqual(logger.logs, []);
|
||||
|
||||
requestPolicyOptions.log(HttpPipelineLogLevel.WARNING, "Message 3");
|
||||
assert.deepStrictEqual(logger.logs, []);
|
||||
|
||||
requestPolicyOptions.log(HttpPipelineLogLevel.ERROR, "Message 4");
|
||||
assert.deepStrictEqual(logger.logs, []);
|
||||
});
|
||||
|
||||
it("should not log when the minimumLogLevel is INFO", () => {
|
||||
const logger = new InMemoryHttpPipelineLogger(HttpPipelineLogLevel.INFO);
|
||||
const requestPolicyOptions = new RequestPolicyOptions(logger);
|
||||
|
||||
requestPolicyOptions.log(HttpPipelineLogLevel.OFF, "Message 1");
|
||||
assert.deepStrictEqual(logger.logs, []);
|
||||
|
||||
requestPolicyOptions.log(HttpPipelineLogLevel.INFO, "Message 2");
|
||||
assert.deepStrictEqual(logger.logs, [
|
||||
"INFO: Message 2"
|
||||
]);
|
||||
|
||||
requestPolicyOptions.log(HttpPipelineLogLevel.WARNING, "Message 3");
|
||||
assert.deepStrictEqual(logger.logs, [
|
||||
"INFO: Message 2",
|
||||
"WARNING: Message 3"
|
||||
]);
|
||||
|
||||
requestPolicyOptions.log(HttpPipelineLogLevel.ERROR, "Message 4");
|
||||
assert.deepStrictEqual(logger.logs, [
|
||||
"INFO: Message 2",
|
||||
"WARNING: Message 3",
|
||||
"ERROR: Message 4"
|
||||
]);
|
||||
});
|
||||
|
||||
it("should not log when the minimumLogLevel is WARNING", () => {
|
||||
const logger = new InMemoryHttpPipelineLogger(HttpPipelineLogLevel.WARNING);
|
||||
const requestPolicyOptions = new RequestPolicyOptions(logger);
|
||||
|
||||
requestPolicyOptions.log(HttpPipelineLogLevel.OFF, "Message 1");
|
||||
assert.deepStrictEqual(logger.logs, []);
|
||||
|
||||
requestPolicyOptions.log(HttpPipelineLogLevel.INFO, "Message 2");
|
||||
assert.deepStrictEqual(logger.logs, []);
|
||||
|
||||
requestPolicyOptions.log(HttpPipelineLogLevel.WARNING, "Message 3");
|
||||
assert.deepStrictEqual(logger.logs, [
|
||||
"WARNING: Message 3"
|
||||
]);
|
||||
|
||||
requestPolicyOptions.log(HttpPipelineLogLevel.ERROR, "Message 4");
|
||||
assert.deepStrictEqual(logger.logs, [
|
||||
"WARNING: Message 3",
|
||||
"ERROR: Message 4"
|
||||
]);
|
||||
});
|
||||
|
||||
it("should not log when the minimumLogLevel is ERROR", () => {
|
||||
const logger = new InMemoryHttpPipelineLogger(HttpPipelineLogLevel.ERROR);
|
||||
const requestPolicyOptions = new RequestPolicyOptions(logger);
|
||||
|
||||
requestPolicyOptions.log(HttpPipelineLogLevel.OFF, "Message 1");
|
||||
assert.deepStrictEqual(logger.logs, []);
|
||||
|
||||
requestPolicyOptions.log(HttpPipelineLogLevel.INFO, "Message 2");
|
||||
assert.deepStrictEqual(logger.logs, []);
|
||||
|
||||
requestPolicyOptions.log(HttpPipelineLogLevel.WARNING, "Message 3");
|
||||
assert.deepStrictEqual(logger.logs, []);
|
||||
|
||||
requestPolicyOptions.log(HttpPipelineLogLevel.ERROR, "Message 4");
|
||||
assert.deepStrictEqual(logger.logs, [
|
||||
"ERROR: Message 4"
|
||||
]);
|
||||
});
|
||||
it("should return false when the minimumLogLevel is OFF", () => {
|
||||
const logger = new InMemoryHttpPipelineLogger(HttpPipelineLogLevel.OFF);
|
||||
const requestPolicyOptions = new RequestPolicyOptions(logger);
|
||||
assert.strictEqual(requestPolicyOptions.shouldLog(HttpPipelineLogLevel.OFF), false);
|
||||
assert.strictEqual(requestPolicyOptions.shouldLog(HttpPipelineLogLevel.INFO), false);
|
||||
assert.strictEqual(requestPolicyOptions.shouldLog(HttpPipelineLogLevel.WARNING), false);
|
||||
assert.strictEqual(requestPolicyOptions.shouldLog(HttpPipelineLogLevel.ERROR), false);
|
||||
});
|
||||
|
||||
it("should return false when the minimumLogLevel is INFO", () => {
|
||||
const logger = new InMemoryHttpPipelineLogger(HttpPipelineLogLevel.INFO);
|
||||
const requestPolicyOptions = new RequestPolicyOptions(logger);
|
||||
assert.strictEqual(requestPolicyOptions.shouldLog(HttpPipelineLogLevel.OFF), false);
|
||||
assert.strictEqual(requestPolicyOptions.shouldLog(HttpPipelineLogLevel.INFO), true);
|
||||
assert.strictEqual(requestPolicyOptions.shouldLog(HttpPipelineLogLevel.WARNING), true);
|
||||
assert.strictEqual(requestPolicyOptions.shouldLog(HttpPipelineLogLevel.ERROR), true);
|
||||
});
|
||||
|
||||
it("should return false when the minimumLogLevel is WARNING", () => {
|
||||
const logger = new InMemoryHttpPipelineLogger(HttpPipelineLogLevel.WARNING);
|
||||
const requestPolicyOptions = new RequestPolicyOptions(logger);
|
||||
assert.strictEqual(requestPolicyOptions.shouldLog(HttpPipelineLogLevel.OFF), false);
|
||||
assert.strictEqual(requestPolicyOptions.shouldLog(HttpPipelineLogLevel.INFO), false);
|
||||
assert.strictEqual(requestPolicyOptions.shouldLog(HttpPipelineLogLevel.WARNING), true);
|
||||
assert.strictEqual(requestPolicyOptions.shouldLog(HttpPipelineLogLevel.ERROR), true);
|
||||
});
|
||||
|
||||
it("should return false when the minimumLogLevel is ERROR", () => {
|
||||
const logger = new InMemoryHttpPipelineLogger(HttpPipelineLogLevel.ERROR);
|
||||
const requestPolicyOptions = new RequestPolicyOptions(logger);
|
||||
assert.strictEqual(requestPolicyOptions.shouldLog(HttpPipelineLogLevel.OFF), false);
|
||||
assert.strictEqual(requestPolicyOptions.shouldLog(HttpPipelineLogLevel.INFO), false);
|
||||
assert.strictEqual(requestPolicyOptions.shouldLog(HttpPipelineLogLevel.WARNING), false);
|
||||
assert.strictEqual(requestPolicyOptions.shouldLog(HttpPipelineLogLevel.ERROR), true);
|
||||
});
|
||||
});
|
||||
|
||||
describe("log()", () => {
|
||||
it("should not log when the logger is undefined", () => {
|
||||
const requestPolicyOptions = new RequestPolicyOptions(undefined);
|
||||
requestPolicyOptions.log(HttpPipelineLogLevel.OFF, "Message 1");
|
||||
requestPolicyOptions.log(HttpPipelineLogLevel.INFO, "Message 2");
|
||||
requestPolicyOptions.log(HttpPipelineLogLevel.WARNING, "Message 3");
|
||||
requestPolicyOptions.log(HttpPipelineLogLevel.ERROR, "Message 4");
|
||||
});
|
||||
|
||||
it("should not log when the minimumLogLevel is OFF", () => {
|
||||
const logger = new InMemoryHttpPipelineLogger(HttpPipelineLogLevel.OFF);
|
||||
const requestPolicyOptions = new RequestPolicyOptions(logger);
|
||||
|
||||
requestPolicyOptions.log(HttpPipelineLogLevel.OFF, "Message 1");
|
||||
assert.deepStrictEqual(logger.logs, []);
|
||||
|
||||
requestPolicyOptions.log(HttpPipelineLogLevel.INFO, "Message 2");
|
||||
assert.deepStrictEqual(logger.logs, []);
|
||||
|
||||
requestPolicyOptions.log(HttpPipelineLogLevel.WARNING, "Message 3");
|
||||
assert.deepStrictEqual(logger.logs, []);
|
||||
|
||||
requestPolicyOptions.log(HttpPipelineLogLevel.ERROR, "Message 4");
|
||||
assert.deepStrictEqual(logger.logs, []);
|
||||
});
|
||||
|
||||
it("should not log when the minimumLogLevel is INFO", () => {
|
||||
const logger = new InMemoryHttpPipelineLogger(HttpPipelineLogLevel.INFO);
|
||||
const requestPolicyOptions = new RequestPolicyOptions(logger);
|
||||
|
||||
requestPolicyOptions.log(HttpPipelineLogLevel.OFF, "Message 1");
|
||||
assert.deepStrictEqual(logger.logs, []);
|
||||
|
||||
requestPolicyOptions.log(HttpPipelineLogLevel.INFO, "Message 2");
|
||||
assert.deepStrictEqual(logger.logs, [
|
||||
"INFO: Message 2"
|
||||
]);
|
||||
|
||||
requestPolicyOptions.log(HttpPipelineLogLevel.WARNING, "Message 3");
|
||||
assert.deepStrictEqual(logger.logs, [
|
||||
"INFO: Message 2",
|
||||
"WARNING: Message 3"
|
||||
]);
|
||||
|
||||
requestPolicyOptions.log(HttpPipelineLogLevel.ERROR, "Message 4");
|
||||
assert.deepStrictEqual(logger.logs, [
|
||||
"INFO: Message 2",
|
||||
"WARNING: Message 3",
|
||||
"ERROR: Message 4"
|
||||
]);
|
||||
});
|
||||
|
||||
it("should not log when the minimumLogLevel is WARNING", () => {
|
||||
const logger = new InMemoryHttpPipelineLogger(HttpPipelineLogLevel.WARNING);
|
||||
const requestPolicyOptions = new RequestPolicyOptions(logger);
|
||||
|
||||
requestPolicyOptions.log(HttpPipelineLogLevel.OFF, "Message 1");
|
||||
assert.deepStrictEqual(logger.logs, []);
|
||||
|
||||
requestPolicyOptions.log(HttpPipelineLogLevel.INFO, "Message 2");
|
||||
assert.deepStrictEqual(logger.logs, []);
|
||||
|
||||
requestPolicyOptions.log(HttpPipelineLogLevel.WARNING, "Message 3");
|
||||
assert.deepStrictEqual(logger.logs, [
|
||||
"WARNING: Message 3"
|
||||
]);
|
||||
|
||||
requestPolicyOptions.log(HttpPipelineLogLevel.ERROR, "Message 4");
|
||||
assert.deepStrictEqual(logger.logs, [
|
||||
"WARNING: Message 3",
|
||||
"ERROR: Message 4"
|
||||
]);
|
||||
});
|
||||
|
||||
it("should not log when the minimumLogLevel is ERROR", () => {
|
||||
const logger = new InMemoryHttpPipelineLogger(HttpPipelineLogLevel.ERROR);
|
||||
const requestPolicyOptions = new RequestPolicyOptions(logger);
|
||||
|
||||
requestPolicyOptions.log(HttpPipelineLogLevel.OFF, "Message 1");
|
||||
assert.deepStrictEqual(logger.logs, []);
|
||||
|
||||
requestPolicyOptions.log(HttpPipelineLogLevel.INFO, "Message 2");
|
||||
assert.deepStrictEqual(logger.logs, []);
|
||||
|
||||
requestPolicyOptions.log(HttpPipelineLogLevel.WARNING, "Message 3");
|
||||
assert.deepStrictEqual(logger.logs, []);
|
||||
|
||||
requestPolicyOptions.log(HttpPipelineLogLevel.ERROR, "Message 4");
|
||||
assert.deepStrictEqual(logger.logs, [
|
||||
"ERROR: Message 4"
|
||||
]);
|
||||
});
|
||||
});
|
||||
});
|
|
@ -10,7 +10,7 @@ export declare class HttpRequest {
|
|||
private readonly _headers;
|
||||
/**
|
||||
* Create a new HTTP request using the provided properties.
|
||||
* @param _httpMethod The HTTP method that will be used to send this request.
|
||||
* @param httpMethod The HTTP method that will be used to send this request.
|
||||
* @param url The URL that this request will be sent to.
|
||||
* @param headers The HTTP headers to include in this request.
|
||||
* @param _body The body of this HTTP request.
|
||||
|
|
Загрузка…
Ссылка в новой задаче