Files
tactility/Tactility/Include/Tactility/network/Http.h
T
Ken Van Hoeylandt f620255c41 New logging and more (#446)
- `TT_LOG_*` macros are replaced by `Logger` via `#include<Tactility/Logger.h>`
- Changed default timezone to Europe/Amsterdam
- Fix for logic bug in unPhone hardware
- Fix for init/deinit in DRV2605 driver
- Other fixes
- Removed optimization that broke unPhone (disabled the moving of heap-related functions to flash)
2026-01-06 22:35:39 +01:00

25 lines
723 B
C++

#pragma once
#include <string>
#include <functional>
namespace tt::network::http {
/**
* Download a file from a URL.
* The server must send the Content-Length header.
* @param url download source URL
* @param certFilePath the path to the .pem file
* @param downloadFilePath The path to downloadd the file to. The parent directories must exist.
* @param onSuccess the success result callback
* @param onError the error result callback
*/
void download(
const std::string& url,
const std::string& certFilePath,
const std::string &downloadFilePath,
const std::function<void()>& onSuccess,
const std::function<void(const char* errorMessage)>& onError
);
}