Windy Community
    • Unread
    • Categories
    • Groups
    • Go to windy.com
    • Register
    • Login

    Point Forecast Api

    Windy API v4
    3
    3
    754
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Lin junjieL
      Lin junjie
      last edited by

      When I send a post request to https://api.windy.com/api/point-forecast/v2, the return value is always 500, but I can use postman software to return the result data normally. Who can tell me how to solve this?
      fabd9fb2-3837-4a13-8549-d4cdaa4c857e-image.png
      b0b9ca2b-5c5d-4351-8fee-8dad78b11ebe-image.png

      Morten Lenschow HansenM 1 Reply Last reply Reply Quote 0
      • Morten Lenschow HansenM
        Morten Lenschow Hansen @Lin junjie
        last edited by

        @lin-junjie You have to JSON.stringify your data/body.

        Like so:

        const body = JSON.stringify({
                "lat": 49.3201,
                "lon": 16.43232,
                "model": "gfs",
                "parameters": ["wind"],
                "key": "djsankgfldngdgflkdgfddsa"
            })
        
        1 Reply Last reply Reply Quote 0
        • Rodrigo DaviaR
          Rodrigo Davia
          last edited by

          @Lin-junjie prove with fetch not ajax

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Windyty, S.E. - all rights reserved. Powered by excellent NodeBB
          NodeBB & contributors, OSM & contributors, HERE maps
          Terms of Use     Privacy Policy