Hi All,
I am trying to download data from Myqtthub.com site. The data is stored in the MyQttHub cloud service and is downloaded in a csv format.
With help from DonManfred I have been able to login to the site and get the token to continue with the download.
The problem I am having is that the data request is preceded by the token received from the initial login and I am not sure how to format the request with the --cookie request.
Download request:
Error recieved:
ResponseError. Reason: Bad Request, Response: ReactiveMyQttWebInterface.HomeController: Unable to start request for service: /stashed/download, no cookie configured (header tokenId). You'll will have to logout and login
Note: The token is a global string and the value is correct.
Any help gratefully accepted.
Thanks
I am trying to download data from Myqtthub.com site. The data is stored in the MyQttHub cloud service and is downloaded in a csv format.
With help from DonManfred I have been able to login to the site and get the token to continue with the download.
The problem I am having is that the data request is preceded by the token received from the initial login and I am not sure how to format the request with the --cookie request.
Download request:
curl --cookie ‘tokenId=e734b134-0f05-4405-935c-7a4834c0603c’ -X POST https://node02.myqtthub.com/stashed/download 3 -d ‘{“tokenId” : “e734b134-0f05-4405-935c-7a4834c0603c”, “domainName” : “your-hub-domain”, “stashName” : “your-stash-name”, “downloadAs” : “csv”, “downloadFrame” : “all”}’
Error recieved:
ResponseError. Reason: Bad Request, Response: ReactiveMyQttWebInterface.HomeController: Unable to start request for service: /stashed/download, no cookie configured (header tokenId). You'll will have to logout and login
Note: The token is a global string and the value is correct.
Data Download:
Sub get_data
Dim stringtosend As String = $"{"tokenid" : ${token}, "domainName" : "mydomainName ", "stashName" : "myStash", "downloadAs" : "csv", "downloadFrame" : "all" }"$
Log(stringtosend)
Dim j As HttpJob
j.Initialize("", Me)
Log("Initialising")
Dim link As String = "https://node02.myqtthub.com/stashed/download"
j.poststring(link,stringtosend )
Wait For (j) JobDone(j As HttpJob)
If j.Success=True Then
Log(j.getstring)
Log("success")
j.Release
Else
'do something'
Log("didn't work")
j.Release
End If
End Sub
Any help gratefully accepted.
Thanks