Skip to content
This repository has been archived by the owner on Apr 26, 2022. It is now read-only.

Commit

Permalink
fix: remove fixed protocol (#137)
Browse files Browse the repository at this point in the history
  • Loading branch information
notrab authored Jul 1, 2019
1 parent 05c74df commit 6f7f4c9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class MoltinClient {
this.storage = storage
this.fetch = options.fetch ? options.fetch : fetch
this.options = {
host: options.host ? options.host : 'api.moltin.com',
host: options.host ? options.host : 'https://api.moltin.com',
version: options.version ? options.version : 'v2',
...others
}
Expand All @@ -44,7 +44,7 @@ export class MoltinClient {
}
} = this

const uri: string = `https://${host}/${version}/${removeLeadingSlash(path)}`
const uri: string = `${host}/${version}/${removeLeadingSlash(path)}`

const customHeaders = {
...classHeaders,
Expand Down Expand Up @@ -112,7 +112,7 @@ export class MoltinClient {
throw new Error('You must provide a client_id')
}

const uri: string = `https://${host}/oauth/access_token`
const uri: string = `${host}/oauth/access_token`

const body: types.AuthBody = {
grant_type: client_secret ? 'client_credentials' : 'implicit',
Expand Down

0 comments on commit 6f7f4c9

Please sign in to comment.