Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
First of all Im using QlikSense Business Cloud. I create a REST-connector with the POST method and it works fine. I see the desired results. The connection works. Then Im including the data from the connector through the icon "Choose data" and then "insert script". Here I also see the correct results. I see that it is receiving the correct results. BUT, when I load the app I get this error: "QVX_UNEXPECTED_END_OF_DATA: HTTP protocol error 400 (Bad Request): Bad Request"
Why?
Any suggestions how to move on from here?
Br
Cristian
ok. This doesnt work. But, I created another script. This is to get the latest token that I need to use in another connection:
LIB CONNECT TO 'DummyPostConnection';
SET vRequestBody = '{"username":"abcde","password":"abcde"}';
let vRequestBody = replace(vRequestBody,'"', chr(34)&chr(34));
RestConnectorMasterTable:
SQL SELECT
"col_1"
FROM CSV (header off, delimiter ",", quote """") "CSV_source"
WITH CONNECTION (
URL "https://X/Login.ashx/",
HTTPHEADER "Content-Type" "application/json",
BODY "$(vRequestBody)"
)
;
[CSV_source]:
LOAD [col_1] AS [col_1]
RESIDENT RestConnectorMasterTable;
DROP TABLE RestConnectorMasterTable;
LET vToken = peek('col_1',0,'CSV_source');
Drop table CSV_source;
These are the settings:
The inserted script:
LIB CONNECT TO 'GetNewToken';
RestConnectorMasterTable:
SQL SELECT
"col_1"
FROM CSV (header off, delimiter ",", quote """") "CSV_source";
[CSV_source]:
LOAD [col_1] AS [col_1]
RESIDENT RestConnectorMasterTable;
DROP TABLE RestConnectorMasterTable;
The error when loading:
ok. This doesnt work. But, I created another script. This is to get the latest token that I need to use in another connection:
LIB CONNECT TO 'DummyPostConnection';
SET vRequestBody = '{"username":"abcde","password":"abcde"}';
let vRequestBody = replace(vRequestBody,'"', chr(34)&chr(34));
RestConnectorMasterTable:
SQL SELECT
"col_1"
FROM CSV (header off, delimiter ",", quote """") "CSV_source"
WITH CONNECTION (
URL "https://X/Login.ashx/",
HTTPHEADER "Content-Type" "application/json",
BODY "$(vRequestBody)"
)
;
[CSV_source]:
LOAD [col_1] AS [col_1]
RESIDENT RestConnectorMasterTable;
DROP TABLE RestConnectorMasterTable;
LET vToken = peek('col_1',0,'CSV_source');
Drop table CSV_source;