Skip to content

Commit

Permalink
fix: Adds X-MOLTIN-SDK-LANGUAGE header to auth (#244)
Browse files Browse the repository at this point in the history
  • Loading branch information
ynnoj authored and notrab committed Feb 20, 2019
1 parent 2a25217 commit 6139841
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/factories/request.js
Expand Up @@ -46,7 +46,9 @@ class RequestFactory {
fetch(`${config.protocol}://${config.host}/${config.auth.uri}`, {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
'Content-Type': 'application/x-www-form-urlencoded',
'X-MOLTIN-SDK-LANGUAGE': config.sdk.language,
'X-MOLTIN-SDK-VERSION': config.sdk.version
},
body: Object.keys(body)
.map(k => `${encodeURIComponent(k)}=${encodeURIComponent(body[k])}`)
Expand Down

0 comments on commit 6139841

Please sign in to comment.