Skip to content

Commit

Permalink
[Identity] Move Axios to validate status locally (Azure#13468)
Browse files Browse the repository at this point in the history
* Enable axios setting locally

* Enable axios setting locally

* Lint fix
  • Loading branch information
Jonathan Turner authored Jan 29, 2021
1 parent 4a874ca commit a697af0
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions sdk/identity/identity/src/client/msalClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,6 @@ export enum HttpMethod {
* This class implements the API for network requests.
*/
export class HttpClient implements INetworkModule {
constructor() {
axios.defaults.validateStatus = () => true;
}

/**
* Http Get request
* @param url -
Expand All @@ -177,7 +173,8 @@ export class HttpClient implements INetworkModule {
const request: AxiosRequestConfig = {
method: HttpMethod.GET,
url: url,
headers: options && options.headers
headers: options && options.headers,
validateStatus: () => true
};

const response = await axios(request);
Expand All @@ -202,7 +199,8 @@ export class HttpClient implements INetworkModule {
method: HttpMethod.POST,
url: url,
data: (options && options.body) || "",
headers: options && options.headers
headers: options && options.headers,
validateStatus: () => true
};

const response = await axios(request);
Expand Down

0 comments on commit a697af0

Please sign in to comment.