Weather App
 
Loading...
Searching...
No Matches
HttpFetcher.h File Reference

Defines the HttpFetcher class for performing HTTP GET requests asynchronously. More...

#include <wx/wx.h>
#include <wx/event.h>
#include <wx/string.h>
#include <thread>
#include <cpr/cpr.h>
Include dependency graph for HttpFetcher.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  HttpFetcher
 Handles asynchronous HTTP GET requests. More...
 

Macros

#define HTTPFETCHER_H
 

Functions

 wxDECLARE_EVENT (EVT_HTTP_FETCH_COMPLETE, wxThreadEvent)
 Custom event type for HTTP fetch completion.
 

Detailed Description

Defines the HttpFetcher class for performing HTTP GET requests asynchronously.

This class is responsible for fetching data from a given URL using the cpr library. The fetched data is then sent to the main thread via a custom wxWidgets event.

Macro Definition Documentation

◆ HTTPFETCHER_H

#define HTTPFETCHER_H

Function Documentation

◆ wxDECLARE_EVENT()

wxDECLARE_EVENT ( EVT_HTTP_FETCH_COMPLETE ,
wxThreadEvent  )

Custom event type for HTTP fetch completion.

This event is emitted when an HTTP request is completed, carrying the response data.