yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
ios_urlsession_http_client.h
Go to the documentation of this file.
1#pragma once
2
3#include <map>
4#include <string>
5
6#include "absl/status/statusor.h"
7
8namespace yaze::cli::ios {
9
11 int status_code = 0;
12 std::string body;
13 std::map<std::string, std::string> headers;
14};
15
16// iOS-only: Perform an HTTP request using NSURLSession.
17// Intended for AI provider calls to avoid shelling out to curl and to get TLS
18// support without OpenSSL.
19absl::StatusOr<UrlSessionHttpResponse> UrlSessionHttpRequest(
20 const std::string& method, const std::string& url,
21 const std::map<std::string, std::string>& headers,
22 const std::string& body, int timeout_ms);
23
24} // namespace yaze::cli::ios
25
absl::StatusOr< UrlSessionHttpResponse > UrlSessionHttpRequest(const std::string &method, const std::string &url, const std::map< std::string, std::string > &headers, const std::string &body, int timeout_ms)
std::map< std::string, std::string > headers