1.13 Upgrade and different results from browser vs code... #732
Unanswered
dangelsaurus
asked this question in
Q&A
Replies: 2 comments
-
Make sure your browser cache is clear, I can’t recall but I believe the cache headers are sent to tell the browser to cache the results locally. Also try using PostMan, it will not cache the results.
Joe Perkins
From: David A ***@***.***>
Sent: Tuesday, June 18, 2024 6:01 PM
To: weather-gov/api ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [weather-gov/api] 1.13 Upgrade and different results from browser vs code... (Discussion #732)
I've aware of the 1.13 upgrade<https://www.weather.gov/media/notification/pdf_2023_24/scn24-55_api_v1.13.pdf> which implements
Removal of the following parameters from the
/gridpoint//,/forecast endpoint:
updated, Relative Humidity, and Dewpoint
from the forecast. I haven't implemented this yet, but noticed today these were missing from my API calls, I assume by "On or about June 20th" they meant this could happen early?
Regardless, what is very odd is that if I visit the URL endpoint in a browser, for example https://api.weather.gov/gridpoints/GSP/54,75/forecast, I see these values.
image.png (view on web)<https://github.com/weather-gov/api/assets/12521900/13fcf5f0-ec17-410a-aab1-c336c2343aa7>
but they are not in the API call from my python code.
{'elevation': {'unitCode': 'wmoUnit:m', 'value': 640.08},
'forecastGenerator': 'BaselineForecastGenerator',
'generatedAt': '2024-06-19T00:04:21+00:00',
'periods': [{'detailedForecast': 'Partly cloudy, with a low around 61. South '
'southeast wind 3 to 8 mph.',
'endTime': '2024-06-19T06:00:00-04:00',
'icon': '/icons/land/night/sct?size=medium',
'isDaytime': False,
'name': 'Tonight',
'number': 1,
'probabilityOfPrecipitation': {'unitCode': 'wmoUnit:percent',
'value': None},
'shortForecast': 'Partly Cloudy',
'startTime': '2024-06-18T20:00:00-04:00',
'temperature': 61,
'temperatureTrend': '',
'temperatureUnit': 'F',
'windDirection': 'SSE',
'windSpeed': '3 to 8 mph'},
.....],
'units': 'us',
'updateTime': '2024-06-18T22:33:43+00:00',
'validTimes': '2024-06-18T16:00:00+00:00/P7DT22H'}
Can I assume this is because https://api.weather.gov/ is a reverse proxy, and possibly serving different results to different user agents? And things will sync up eventually?
—
Reply to this email directly, view it on GitHub<#732>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADJHCGY54ICEXAZXGPE3QHTZIDJ5DAVCNFSM6AAAAABJRBOTI6VHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZWHAZTMOJYHE>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.******@***.***>>
|
Beta Was this translation helpful? Give feedback.
0 replies
-
I tested with a PHP and Python client and got results with dewpoint and RH from my gridpoint, so it seems the values are still enabled as long as the WFO is sending them. Your Python output is truncated and the keys are reordered from the JSON so its possible you accidentally clipped them off. The Akamai layer is caching. Take a look at your cache-control headers to see if you are just getting the same page over and over. For /gridpoints the cache time is 1 hour. It does look at user-agent to determine whether to re-serve the same page. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I've aware of the 1.13 upgrade which implements
from the forecast. I haven't implemented this yet, but noticed today these were missing from my API calls, I assume by "On or about June 20th" they meant this could happen early?
Regardless, what is very odd is that if I visit the URL endpoint in a browser, for example https://api.weather.gov/gridpoints/GSP/54,75/forecast, I see these values.
but they are not in the API call from my python code.
Can I assume this is because https://api.weather.gov/ is a reverse proxy, and possibly serving different results to different user agents? And things will sync up eventually?
Beta Was this translation helpful? Give feedback.
All reactions