Simple GET request works.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
0b525bb748
commit
cac3e0b505
|
@ -57,7 +57,7 @@ public:
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
*/
|
*/
|
||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
answer_type get(API::endpoint_type endpoint) const;
|
answer_type get(API::endpoint_type endpoint);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Make a HTTP GET call.
|
* @brief Make a HTTP GET call.
|
||||||
|
@ -67,7 +67,7 @@ public:
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
*/
|
*/
|
||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
answer_type get(string endpoint) const;
|
answer_type get(string endpoint);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Instance &_instance;
|
Instance &_instance;
|
||||||
|
|
|
@ -23,17 +23,17 @@ Request::Request(Instance &instance)
|
||||||
: _instance{instance}
|
: _instance{instance}
|
||||||
{}
|
{}
|
||||||
|
|
||||||
answer_type Request::get(API::endpoint_type endpoint) const
|
answer_type Request::get(API::endpoint_type endpoint)
|
||||||
{
|
{
|
||||||
answer_type answer;
|
answer_type answer;
|
||||||
answer.body = API{endpoint}.to_string();
|
answer.body = API{endpoint}.to_string();
|
||||||
return answer;
|
return answer;
|
||||||
}
|
}
|
||||||
|
|
||||||
answer_type Request::get(string endpoint) const
|
answer_type Request::get(string endpoint)
|
||||||
{
|
{
|
||||||
answer_type answer;
|
answer_type answer;
|
||||||
answer.body = endpoint;
|
answer.body = make_request(http_method::GET, "https://ip.tastytea.de/");
|
||||||
return answer;
|
return answer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user