Skip to content

Commit

Permalink
fix(users): users defaults to https://www.arcgis.com instead of http://
Browse files Browse the repository at this point in the history
always use HTTPS

AFFECTS PACKAGES:
@esri/arcgis-rest-users
  • Loading branch information
tomwayson committed Jul 12, 2018
1 parent 2aa15e8 commit 7e3d9f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/arcgis-rest-users/src/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export function getUser(

// if a username is passed, assume ArcGIS Online
if (typeof requestOptions === "string") {
url = `http://www.arcgis.com/sharing/rest/community/users/${requestOptions}`;
url = `https://www.arcgis.com/sharing/rest/community/users/${requestOptions}`;
} else {
// if an authenticated session is passed, default to that user/portal unless another username is provided manually
const username =
Expand Down
2 changes: 1 addition & 1 deletion packages/arcgis-rest-users/test/users.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe("users", () => {
expect(fetchMock.called()).toEqual(true);
const [url, options]: [string, RequestInit] = fetchMock.lastCall("*");
expect(url).toEqual(
"http://www.arcgis.com/sharing/rest/community/users/jsmith?f=json"
"https://www.arcgis.com/sharing/rest/community/users/jsmith?f=json"
);
expect(options.method).toBe("GET");
done();
Expand Down

0 comments on commit 7e3d9f6

Please sign in to comment.