Skip to content

Commit

Permalink
Update getWeather.nim
Browse files Browse the repository at this point in the history
added timeout of 1000 milliseconds
  • Loading branch information
DrunkenAlcoholic authored Feb 25, 2024
1 parent 2c0e5b1 commit 4882476
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion example status/src/functions/getWeather.nim
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ proc getWeather(): string =
result = sWeather # Do something with the weather information
else:
dTimeStamp = some(now())
var hClient = newHttpClient()
var hClient = newHttpClient(timeout = 1000)
try:
sWeather = WEATHER_ICON & hClient.getContent("http://wttr.in/" & CITY & "?format=%t")
result = sWeather
Expand Down

0 comments on commit 4882476

Please sign in to comment.