mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-10-15 10:04:44 +00:00
Update generate pipeline to add OpenAI api as an additional backend (for comparison testing), add brewery coordinates (#244)
* add brewery coordinates * Add openai mode * Add coordinates to schema * Fix C++ review findings in pipeline: k-prefixed enum values, include ordering, populated validation error messages, conventional const notation, and endl replaced with newline
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "services/logging/logger.h"
|
||||
#include "web_client/web_client.h"
|
||||
@@ -39,6 +40,22 @@ class HttpWebClient final : public WebClient {
|
||||
*/
|
||||
std::string Get(const std::string& url) override;
|
||||
|
||||
/**
|
||||
* @brief Executes a blocking HTTP/HTTPS POST request against a full URL.
|
||||
*
|
||||
* Sends @p body with a "Content-Type: application/json" header, plus any
|
||||
* additional headers supplied by the caller (e.g. authentication).
|
||||
*
|
||||
* @param url Fully-qualified URL.
|
||||
* @param body Request body, sent as-is.
|
||||
* @param headers Additional request headers.
|
||||
* @return Response body on HTTP 2xx; throws std::runtime_error otherwise.
|
||||
*/
|
||||
std::string Post(
|
||||
const std::string& url, const std::string& body,
|
||||
const std::vector<std::pair<std::string, std::string>>& headers)
|
||||
override;
|
||||
|
||||
/**
|
||||
* @brief Percent-encodes a single URI component (query parameter value or
|
||||
* path segment). Delegates to httplib::encode_uri_component().
|
||||
|
||||
Reference in New Issue
Block a user