From 613984199a58eadf6e82f46580a5c6eb4e3a6076 Mon Sep 17 00:00:00 2001 From: Jonathan Steele Date: Wed, 20 Feb 2019 09:34:35 +0000 Subject: [PATCH] fix: Adds X-MOLTIN-SDK-LANGUAGE header to auth (#244) --- src/factories/request.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/factories/request.js b/src/factories/request.js index 480cb5285..b17e4763f 100644 --- a/src/factories/request.js +++ b/src/factories/request.js @@ -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])}`)