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

    Point Forecast Api

    Scheduled Pinned Locked Moved Windy API v4
    3 Posts 3 Posters 1.0k Views 1 Watching
    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 Offline
      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 Offline
        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 Offline
          Rodrigo Davia
          last edited by

          @Lin-junjie prove with fetch not ajax

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Windy Community  |  Powered by excellent NodeBB
          Terms of Use     Privacy Policy     Windy.com