Skip to content

Commit

Permalink
fix annoying typing error
Browse files Browse the repository at this point in the history
  • Loading branch information
gautamsi committed Sep 5, 2019
1 parent 5d7962b commit 9720e88
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ewsjs/xhr",
"version": "1.4.0",
"version": "1.4.1",
"description": "alternate XHR methods for ewsjs",
"main": "src/index.js",
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions src/ews.partial.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export interface IXHROptions {
headers?: any;
data?: any;
responseType?: string;
allowRedirect?: boolean;
customRequestInitializer?: (request: XMLHttpRequest) => void;
cookies?: any;
jar?: any;
Expand Down
2 changes: 1 addition & 1 deletion src/xhrApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ var XhrApi = /** @class */ (function () {
body: xhroptions.data,
headers: xhroptions.headers,
method: xhroptions.type,
followRedirect: false,
followRedirect: !!xhroptions.allowRedirect,
};
options["rejectUnauthorized"] = !this.allowUntrustedCertificate;
// if (this.allowUntrustedCertificate) {
Expand Down
4 changes: 1 addition & 3 deletions src/xhrApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import * as Promise from "bluebird";
import { IXHROptions, IXHRApi, IXHRProgress } from "./ews.partial";
import { setupXhrResponse } from "./utils";

import { Agent as httpsAgent, RequestOptions } from "https";
import { ClientResponse } from "http"
import { IProvider } from "./IProvider";
import { NtlmProvider } from './ntlmProvider';
import { CookieProvider } from './cookieProvider';
Expand Down Expand Up @@ -139,7 +137,7 @@ export class XhrApi implements IXHRApi {
body: xhroptions.data,
headers: xhroptions.headers,
method: <any>xhroptions.type,
followRedirect: false,
followRedirect: !!xhroptions.allowRedirect,
//resolveWithFullResponse: true
}
options["rejectUnauthorized"] = !this.allowUntrustedCertificate;
Expand Down

0 comments on commit 9720e88

Please sign in to comment.