From 412a7c638bf48cf188bfe64dcb86ba3467ddb4c1 Mon Sep 17 00:00:00 2001 From: szymjaw Date: Sat, 28 Sep 2019 21:58:21 +0200 Subject: [PATCH] MiniMed Connect error: Bad response from CareLink (#15) MiniMed Connect error: Error: Bad response from CareLink: data for login should be send in body. If data for login are in address "https://carelink.minimed.eu/patient/j_security_check?j_username=XXX&j_password=YYY", application send response "Bad Request page". When the address is 'https://carelink.minimed.eu/patient/j_security_check' and post body = "j_username=XXX&j_password=YYY" all is ok. j_character_encoding: "UTF-8" I add becouse careapplication put this in post body. --- carelink.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/carelink.js b/carelink.js index db41bb5..4b5a9e0 100644 --- a/carelink.js +++ b/carelink.js @@ -90,7 +90,7 @@ var Client = exports.Client = function (options) { CARELINK_SECURITY_URL, reqOptions({ jar: jar, - qs: {j_username: options.username, j_password: options.password} + form: {j_username: options.username, j_password: options.password, j_character_encoding: "UTF-8"} }), checkResponseThen(next) );