访问FitBit API时出现错误请求错误

时间:2018-01-21 03:19:22

标签: json r api fitbit

我试图从我的fitbit中检索数据但是当我使用GET()函数访问JSON时,我得到了400错误。

这是我的代码:

Response [http://api.fitbit.com/1/user/-/activities/heartrate/date/2018-01-
01/today.json]
Date: 2018-01-20 22:07
Status: 400
Content-Type: application/json
Size: 122 B

尝试使用以下命令访问JSON:

  //call the method and pass the xpath. You can also create css, id etc. 

  page.WaitForElementNoLongerDisplayed_byXpath("//div[contains(@class, 'my-error-message')]");



   public static void WaitForElementNoLongerDisplayed_byXpath(string elementXpath)
    {
        try
        {
            _wait.Until(driver => driver.FindElements(By.XPath(elementXpath)).Count == 0);
        }
        catch (Exception)
        {
            LogFunctions.WriteError("Element is still displayed and should not be");
            TakeScreenshot("elementStillShown");
            throw;
        }
    }

结果如下:

Setup of JMS message listener invoker failed for destination 'MY.QUEUE' - trying to recover. 
Cause: Local JMS transaction failed to commit; nested exception is com.ibm.msg.client.jms.DetailedIllegalStateException: 
MQJCA1020: The session is closed.
The application attempted to use a JMS session after it had closed the session.
Modify the application so that it closes the JMS session only after it has finished using the session.

感谢任何帮助

0 个答案:

没有答案