From 3b19b0eeca1ac10bc9127c5a0b9a6aa7884365b8 Mon Sep 17 00:00:00 2001 From: Benjamin Sergeant Date: Sun, 4 Apr 2021 23:26:22 -0700 Subject: [PATCH] http client: DEL is not a verb, but DELETE is, fix #281 --- docs/CHANGELOG.md | 4 ++++ ixwebsocket/IXHttpClient.cpp | 7 ++++--- ixwebsocket/IXHttpClient.h | 4 ++-- ixwebsocket/IXWebSocketVersion.h | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index d5da89c6..0c6e0c1d 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -2,6 +2,10 @@ All changes to this project will be documented in this file. +## [11.2.5] - 2021-04-04 + +(http client) DEL is not an HTTP method name, but DELETE is + ## [11.2.4] - 2021-03-25 (cmake) install IXUniquePtr.h diff --git a/ixwebsocket/IXHttpClient.cpp b/ixwebsocket/IXHttpClient.cpp index d20f1c4d..3e345892 100644 --- a/ixwebsocket/IXHttpClient.cpp +++ b/ixwebsocket/IXHttpClient.cpp @@ -20,10 +20,11 @@ namespace ix { + // https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods const std::string HttpClient::kPost = "POST"; const std::string HttpClient::kGet = "GET"; const std::string HttpClient::kHead = "HEAD"; - const std::string HttpClient::kDel = "DEL"; + const std::string HttpClient::kDelete = "DELETE"; const std::string HttpClient::kPut = "PUT"; const std::string HttpClient::kPatch = "PATCH"; @@ -557,9 +558,9 @@ namespace ix return request(url, kHead, std::string(), args); } - HttpResponsePtr HttpClient::del(const std::string& url, HttpRequestArgsPtr args) + HttpResponsePtr HttpClient::Delete(const std::string& url, HttpRequestArgsPtr args) { - return request(url, kDel, std::string(), args); + return request(url, kDelete, std::string(), args); } HttpResponsePtr HttpClient::request(const std::string& url, diff --git a/ixwebsocket/IXHttpClient.h b/ixwebsocket/IXHttpClient.h index c192c4bb..c4b05845 100644 --- a/ixwebsocket/IXHttpClient.h +++ b/ixwebsocket/IXHttpClient.h @@ -30,7 +30,7 @@ namespace ix HttpResponsePtr get(const std::string& url, HttpRequestArgsPtr args); HttpResponsePtr head(const std::string& url, HttpRequestArgsPtr args); - HttpResponsePtr del(const std::string& url, HttpRequestArgsPtr args); + HttpResponsePtr Delete(const std::string& url, HttpRequestArgsPtr args); HttpResponsePtr post(const std::string& url, const HttpParameters& httpParameters, @@ -94,7 +94,7 @@ namespace ix const static std::string kPost; const static std::string kGet; const static std::string kHead; - const static std::string kDel; + const static std::string kDelete; const static std::string kPut; const static std::string kPatch; diff --git a/ixwebsocket/IXWebSocketVersion.h b/ixwebsocket/IXWebSocketVersion.h index 95737637..befa5098 100644 --- a/ixwebsocket/IXWebSocketVersion.h +++ b/ixwebsocket/IXWebSocketVersion.h @@ -6,4 +6,4 @@ #pragma once -#define IX_WEBSOCKET_VERSION "11.2.4" +#define IX_WEBSOCKET_VERSION "11.2.5"