Skip to content

Commit

Permalink
Add Accept header
Browse files Browse the repository at this point in the history
  • Loading branch information
monosans committed May 6, 2024
1 parent a5dc66c commit a84bf69
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion aiopywttr/_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from typing import Optional

from aiohttp import ClientResponse, ClientSession
from aiohttp import ClientResponse, ClientSession, hdrs
from typing_extensions import Any


Expand All @@ -23,6 +23,7 @@ async def fetch(
async with session.get(
f"https://wttr.in/{location}",
params={"format": "j1", "lang": language},
headers={hdrs.ACCEPT: "application/json"},
raise_for_status=True,
) as response:
await response.read()
Expand Down

0 comments on commit a84bf69

Please sign in to comment.