Skip to content

Commit

Permalink
Merge pull request #243 from Esri/fix/users-defaults-to-https
Browse files Browse the repository at this point in the history
fix(users): users defaults to https://www.arcgis.com instead of http://
  • Loading branch information
jgravois authored Jul 12, 2018
2 parents 2aa15e8 + 7e3d9f6 commit d92e053
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 d92e053

Please sign in to comment.