Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
http.hpp File Reference
#include <functional>
#include <map>
#include <string>
#include <string_view>

Go to the source code of this file.

Classes

struct  pulp::runtime::HttpRequest
struct  pulp::runtime::HttpResponse

Namespaces

namespace  pulp
namespace  pulp::runtime

Typedefs

using pulp::runtime::HttpHeaders = std::map<std::string, std::string>
using pulp::runtime::HttpChunkCallback = std::function<bool(std::string_view)>

Functions

HttpResponse pulp::runtime::http_request (const HttpRequest &request)
 Perform an HTTP request. GET and POST are supported.
HttpResponse pulp::runtime::http_get (std::string_view url, int timeout_seconds=30)
 Perform an HTTP GET request.
HttpResponse pulp::runtime::http_post (std::string_view url, std::string_view body, std::string_view content_type="application/json", int timeout_seconds=30)
 Perform an HTTP POST request with a body.
bool pulp::runtime::http_download (std::string_view url, std::string_view output_path, int timeout_seconds=60)
 Download a file from a URL to a local path. Returns true on success.