Skip to content

why does this call of open-meteo api not work? #141

Answered by renaudpawlak
HFolkertH asked this question in Q&A
Discussion options

You must be logged in to vote

Ok. I have made a fix. You API used a Transfer-Encoding header that is not appreciated by the browser :)

Also, you should check "the use proxy" checkbox to avoid CORS problems and it should work just fin. My component just in case:

{
  "cid": "index1",
  "type": "ContainerView",
  "dataType": "object",
  "layout": "block",
  "components": [
    {
      "cid": "weather-api",
      "type": "HttpConnector",
      "method": "GET",
      "eventHandlers": [],
      "baseUrl": "https://api.open-meteo.com/v1/forecast?latitude=48.85&longitude=2.35&daily=weathercode,temperature_2m_max,temperature_2m_min&timezone=Europe/Berlin",
      "resultType": "JSON",
      "dataType": "object",
      "proxy": …

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@HFolkertH
Comment options

Answer selected by HFolkertH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants