diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/connection.hpp | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/include/connection.hpp b/include/connection.hpp index 0ed09eb..398b8d5 100644 --- a/include/connection.hpp +++ b/include/connection.hpp @@ -162,6 +162,58 @@ public: } /*! + * @brief Make a HTTP PATCH call with parameters. + * + * @param endpoint Endpoint as API::endpoint_type or `std::string_view`. + * @param parameters A map of parameters. + * + * + * @since 0.1.0 + */ + [[nodiscard]] + answer_type patch(const endpoint_variant &endpoint, + const parametermap ¶meters); + + /*! + * @brief Make a HTTP PATCH call. + * + * @param endpoint Endpoint as API::endpoint_type or `std::string_view`. + * + * @since 0.1.0 + */ + [[nodiscard]] + inline answer_type patch(const endpoint_variant &endpoint) + { + return post(endpoint, {}); + } + + /*! + * @brief Make a HTTP PUT call with parameters. + * + * @param endpoint Endpoint as API::endpoint_type or `std::string_view`. + * @param parameters A map of parameters. + * + * + * @since 0.1.0 + */ + [[nodiscard]] + answer_type put(const endpoint_variant &endpoint, + const parametermap ¶meters); + + /*! + * @brief Make a HTTP PUT call. + * + * @param endpoint Endpoint as API::endpoint_type or `std::string_view`. + * + * @since 0.1.0 + */ + [[nodiscard]] + inline answer_type put(const endpoint_variant &endpoint) + { + return post(endpoint, {}); + } + + /*! * @brief Copy new stream contents and delete the “original”. * * Note that the last event is not necessarily complete, it could happen |