Skip to content

Add payload to delete operation - #78

Merged
juliancnn merged 2 commits into
1.0.0from
bug/77-delete-requests-do-not-send-payload
Dec 29, 2025
Merged

Add payload to delete operation#78
juliancnn merged 2 commits into
1.0.0from
bug/77-delete-requests-do-not-send-payload

Conversation

@NahuFigueroa97

@NahuFigueroa97 NahuFigueroa97 commented Dec 23, 2025

Copy link
Copy Markdown
Member

Description

This pull request adds support for sending a payload in DELETE requests in the urlRequest TestTool.

Previously, DELETE actions did not reliably support request bodies, and providing a JSON payload could lead to runtime errors due to implicit type conversions. With this change, DELETE requests now handle payloads consistently with other HTTP methods such as POST, PUT, and PATCH.


Proposed Changes

  • Added support for JSON payloads in DELETE requests.
  • Explicitly use TRequestParameters<nlohmann::json> for DELETE actions to avoid implicit json → std::string conversions.
  • Ensure JSON payloads are correctly serialized before being sent.
  • Align DELETE request behavior with POST/PUT/PATCH for more consistent API testing.

Motivation

Some REST APIs allow or require a request body in DELETE operations (for example, to specify resources, filters, or conditions). Without payload support, the TestTool could not accurately test these APIs.

This change improves flexibility and correctness when testing REST endpoints that expect a DELETE body.


Testing

Details
import base64
import json
from http.server import BaseHTTPRequestHandler, HTTPServer
from urllib.parse import urlparse, parse_qs
import argparse

STORE = {}

class Handler(BaseHTTPRequestHandler):
    server_version = "MiniRestServer/1.0"

    def _json(self, code: int, payload: dict):
        self.send_response(code)
        self.send_header("Content-Type", "application/json")
        self.end_headers()
        self.wfile.write(json.dumps(payload, ensure_ascii=False).encode("utf-8"))

    def _unauthorized(self):
        self.send_response(401)
        self.send_header("Content-Type", "application/json")
        self.send_header("WWW-Authenticate", 'Basic realm="test"')
        self.end_headers()
        self.wfile.write(json.dumps({"status": "error", "error": "unauthorized"}).encode("utf-8"))

    def _check_basic_auth(self) -> bool:
        user = getattr(self.server, "auth_user", None)
        pwd = getattr(self.server, "auth_pass", None)
        if not user:
            return True

        auth = self.headers.get("Authorization", "")
        if not auth.startswith("Basic "):
            return False
        try:
            decoded = base64.b64decode(auth.split(" ", 1)[1]).decode("utf-8")
        except Exception:
            return False
        return decoded == f"{user}:{pwd}"

    def _read_body(self):
        length = int(self.headers.get("Content-Length", "0"))
        if length <= 0:
            return None, ""
        raw = self.rfile.read(length)
        text = raw.decode("utf-8", errors="replace").strip()
        if not text:
            return None, ""
        try:
            return json.loads(text), text
        except json.JSONDecodeError:
            return text, text

    def _get_id(self, parsed, body_obj):
        qs = parse_qs(parsed.query)
        if "id" in qs and qs["id"]:
            return qs["id"][0]
        if isinstance(body_obj, dict) and "id" in body_obj:
            return str(body_obj["id"])
        return None

    def do_GET(self):
        if not self._check_basic_auth():
            return self._unauthorized()

        parsed = urlparse(self.path)
        if parsed.path != "/resource":
            return self._json(404, {"status": "error", "error": "not_found"})

        qs = parse_qs(parsed.query)
        rid = qs.get("id", [None])[0]
        if rid:
            if rid not in STORE:
                return self._json(404, {"status": "error", "error": "not_found", "id": rid})
            return self._json(200, {"status": "ok", "data": STORE[rid]})

        return self._json(200, {"status": "ok", "data": list(STORE.values())})

    def do_PUT(self):
        if not self._check_basic_auth():
            return self._unauthorized()

        parsed = urlparse(self.path)
        if parsed.path != "/resource":
            return self._json(404, {"status": "error", "error": "not_found"})

        body_obj, body_raw = self._read_body()
        if not isinstance(body_obj, dict):
            return self._json(400, {"status": "error", "error": "body_must_be_json_object", "body_raw": body_raw})

        rid = self._get_id(parsed, body_obj)
        if not rid:
            return self._json(400, {"status": "error", "error": "missing_id"})

        new_obj = dict(body_obj)
        new_obj["id"] = rid

        existed = rid in STORE
        STORE[rid] = new_obj

        return self._json(
            200,
            {
                "status": "ok",
                "action": "replaced" if existed else "created",
                "data": new_obj,
            },
        )

    def do_DELETE(self):
        if not self._check_basic_auth():
            return self._unauthorized()

        parsed = urlparse(self.path)
        if parsed.path != "/resource":
            return self._json(404, {"status": "error", "error": "not_found"})

        body_obj, _ = self._read_body()
        rid = self._get_id(parsed, body_obj)
        if not rid:
            return self._json(400, {"status": "error", "error": "missing_id"})

        if rid not in STORE:
            return self._json(404, {"status": "error", "error": "not_found", "id": rid})

        deleted = STORE.pop(rid)
        return self._json(200, {"status": "ok", "deleted": deleted})

    def log_message(self, fmt, *args):
        pass

def main():
    ap = argparse.ArgumentParser()
    ap.add_argument("--host", default="127.0.0.1")
    ap.add_argument("--port", type=int, default=8000)
    ap.add_argument("--user", default=None)
    ap.add_argument("--pass", dest="pwd", default=None)
    args = ap.parse_args()

    httpd = HTTPServer((args.host, args.port), Handler)
    httpd.auth_user = args.user
    httpd.auth_pass = args.pwd

    print(f"Listening on http://{args.host}:{args.port}")
    if args.user:
        print("Basic auth enabled")
    httpd.serve_forever()

if __name__ == "__main__":
    main()
(venv) ╭─root@ca37659e68c4 /workspaces/devContainer/wazuh-http-request/build ‹bug/77-delete-requests-do-not-send-payload●› 
╰─# ./test_tool/urlrequest_testtool -u http://127.0.0.1:8000/resource -t put -p del.json                                                   1 ↵
{"status": "ok", "action": "replaced", "data": {"id": "123"}}
(venv) ╭─root@ca37659e68c4 /workspaces/devContainer/wazuh-http-request/build ‹bug/77-delete-requests-do-not-send-payload●› 
╰─# ./test_tool/urlrequest_testtool -u http://127.0.0.1:8000/resource -t get               
{"status": "ok", "data": [{"id": "123"}]}
(venv) ╭─root@ca37659e68c4 /workspaces/devContainer/wazuh-http-request/build ‹bug/77-delete-requests-do-not-send-payload●› 
╰─# ./test_tool/urlrequest_testtool -u http://127.0.0.1:8000/resource -t delete -p del.json
{"status": "ok", "deleted": {"id": "123"}}
(venv) ╭─root@ca37659e68c4 /workspaces/devContainer/wazuh-http-request/build ‹bug/77-delete-requests-do-not-send-payload●› 
╰─# ./test_tool/urlrequest_testtool -u http://127.0.0.1:8000/resource -t put -p del.json   
{"status": "ok", "action": "created", "data": {"id": "123"}}
(venv) ╭─root@ca37659e68c4 /workspaces/devContainer/wazuh-http-request/build ‹bug/77-delete-requests-do-not-send-payload●› 
╰─# ./test_tool/urlrequest_testtool -u http://127.0.0.1:8000/resource -t get               
{"status": "ok", "data": [{"id": "123"}]}
(venv) ╭─root@ca37659e68c4 /workspaces/devContainer/wazuh-http-request/build ‹bug/77-delete-requests-do-not-send-payload●› 
╰─# ./test_tool/urlrequest_testtool -u http://127.0.0.1:8000/resource -t delete -p del.json
Client error: 404. Response body: {"status": "error", "error": "not_found", "id": "12"}


╭─root@ca37659e68c4 /workspaces/devContainer/wazuh-http-request/build ‹bug/77-delete-requests-do-not-send-payload●› 
╰─# ./test/component/urlrequest_component_test
[==========] Running 67 tests from 2 test suites.
[----------] Global test environment set-up.
[----------] 55 tests from ComponentTestInterface
[ RUN      ] ComponentTestInterface.GetHelloWorld
[       OK ] ComponentTestInterface.GetHelloWorld (34 ms)
[ RUN      ] ComponentTestInterface.GetHelloWorldRedirection
[       OK ] ComponentTestInterface.GetHelloWorldRedirection (14 ms)
[ RUN      ] ComponentTestInterface.PostHelloWorld
[       OK ] ComponentTestInterface.PostHelloWorld (17 ms)
[ RUN      ] ComponentTestInterface.PutHelloWorld
[       OK ] ComponentTestInterface.PutHelloWorld (29 ms)
[ RUN      ] ComponentTestInterface.DeleteRandomID
[       OK ] ComponentTestInterface.DeleteRandomID (25 ms)
[ RUN      ] ComponentTestInterface.DownloadFile
[       OK ] ComponentTestInterface.DownloadFile (20 ms)
[ RUN      ] ComponentTestInterface.DownloadFileEmptyURL
[       OK ] ComponentTestInterface.DownloadFileEmptyURL (16 ms)
[ RUN      ] ComponentTestInterface.DownloadFileError
[       OK ] ComponentTestInterface.DownloadFileError (29 ms)
[ RUN      ] ComponentTestInterface.DownloadFileUsingTheSingleHandler
[       OK ] ComponentTestInterface.DownloadFileUsingTheSingleHandler (17 ms)
[ RUN      ] ComponentTestInterface.DownloadFileEmptyURLUsingTheSingleHandler
[       OK ] ComponentTestInterface.DownloadFileEmptyURLUsingTheSingleHandler (22 ms)
[ RUN      ] ComponentTestInterface.DownloadFileErrorUsingTheSingleHandler
[       OK ] ComponentTestInterface.DownloadFileErrorUsingTheSingleHandler (23 ms)
[ RUN      ] ComponentTestInterface.DownloadFileUsingTheMultiHandler
[       OK ] ComponentTestInterface.DownloadFileUsingTheMultiHandler (30 ms)
[ RUN      ] ComponentTestInterface.InterruptMultiHandler
[       OK ] ComponentTestInterface.InterruptMultiHandler (17 ms)
[ RUN      ] ComponentTestInterface.InterruptDownload
[       OK ] ComponentTestInterface.InterruptDownload (63 ms)
[ RUN      ] ComponentTestInterface.DownloadFileEmptyURLUsingTheMultiHandler
[       OK ] ComponentTestInterface.DownloadFileEmptyURLUsingTheMultiHandler (12 ms)
[ RUN      ] ComponentTestInterface.DownloadFileErrorUsingTheMultiHandler
[       OK ] ComponentTestInterface.DownloadFileErrorUsingTheMultiHandler (29 ms)
[ RUN      ] ComponentTestInterface.GetHelloWorldFile
[       OK ] ComponentTestInterface.GetHelloWorldFile (24 ms)
[ RUN      ] ComponentTestInterface.GetHelloWorldFileJson
[       OK ] ComponentTestInterface.GetHelloWorldFileJson (46 ms)
[ RUN      ] ComponentTestInterface.GetHelloWorldFileEmptyURL
[       OK ] ComponentTestInterface.GetHelloWorldFileEmptyURL (17 ms)
[ RUN      ] ComponentTestInterface.PostHelloWorldFile

[       OK ] ComponentTestInterface.PostHelloWorldFile (42 ms)
[ RUN      ] ComponentTestInterface.PostHelloWorldFileRaw

[       OK ] ComponentTestInterface.PostHelloWorldFileRaw (28 ms)
[ RUN      ] ComponentTestInterface.PostHelloWorldFileEmptyURL
[       OK ] ComponentTestInterface.PostHelloWorldFileEmptyURL (26 ms)
[ RUN      ] ComponentTestInterface.PutHelloWorldFile

[       OK ] ComponentTestInterface.PutHelloWorldFile (32 ms)
[ RUN      ] ComponentTestInterface.PutHelloWorldFileRaw

[       OK ] ComponentTestInterface.PutHelloWorldFileRaw (40 ms)
[ RUN      ] ComponentTestInterface.PutHelloWorldFileEmptyURL
[       OK ] ComponentTestInterface.PutHelloWorldFileEmptyURL (14 ms)
[ RUN      ] ComponentTestInterface.DeleteRandomIDFile

[       OK ] ComponentTestInterface.DeleteRandomIDFile (31 ms)
[ RUN      ] ComponentTestInterface.DeleteRandomIDFileEmptyURL
[       OK ] ComponentTestInterface.DeleteRandomIDFileEmptyURL (14 ms)
[ RUN      ] ComponentTestInterface.GetWithCustomHeader
[       OK ] ComponentTestInterface.GetWithCustomHeader (50 ms)
[ RUN      ] ComponentTestInterface.GetWithDefaultHeaders
[       OK ] ComponentTestInterface.GetWithDefaultHeaders (37 ms)
[ RUN      ] ComponentTestInterface.PostWithCustomHeaders
[       OK ] ComponentTestInterface.PostWithCustomHeaders (34 ms)
[ RUN      ] ComponentTestInterface.PutWithCustomHeaders
[       OK ] ComponentTestInterface.PutWithCustomHeaders (24 ms)
[ RUN      ] ComponentTestInterface.PatchSimpleFunctionality
[       OK ] ComponentTestInterface.PatchSimpleFunctionality (27 ms)
[ RUN      ] ComponentTestInterface.DownloadWithCustomUserAgent
[       OK ] ComponentTestInterface.DownloadWithCustomUserAgent (33 ms)
[ RUN      ] ComponentTestInterface.PostWithCustomUserAgent
[       OK ] ComponentTestInterface.PostWithCustomUserAgent (20 ms)
[ RUN      ] ComponentTestInterface.GetWithCustomUserAgent
[       OK ] ComponentTestInterface.GetWithCustomUserAgent (53 ms)
[ RUN      ] ComponentTestInterface.PutWithCustomUserAgent
[       OK ] ComponentTestInterface.PutWithCustomUserAgent (53 ms)
[ RUN      ] ComponentTestInterface.PatchWithCustomUserAgent
[       OK ] ComponentTestInterface.PatchWithCustomUserAgent (37 ms)
[ RUN      ] ComponentTestInterface.DeleteWithCustomUserAgent
[       OK ] ComponentTestInterface.DeleteWithCustomUserAgent (30 ms)
[ RUN      ] ComponentTestInterface.DownloadTestTimeoutSingleHandler
[       OK ] ComponentTestInterface.DownloadTestTimeoutSingleHandler (66 ms)
[ RUN      ] ComponentTestInterface.DownloadTestTimeoutMultiHandler
[       OK ] ComponentTestInterface.DownloadTestTimeoutMultiHandler (43 ms)
[ RUN      ] ComponentTestInterface.GetTestTimeoutSingleHandler
[       OK ] ComponentTestInterface.GetTestTimeoutSingleHandler (43 ms)
[ RUN      ] ComponentTestInterface.GetTestTimeoutMultiHandler
[       OK ] ComponentTestInterface.GetTestTimeoutMultiHandler (41 ms)
[ RUN      ] ComponentTestInterface.PutTestTimeoutSingleHandler
[       OK ] ComponentTestInterface.PutTestTimeoutSingleHandler (48 ms)
[ RUN      ] ComponentTestInterface.PutTestTimeoutMultiHandler
[       OK ] ComponentTestInterface.PutTestTimeoutMultiHandler (29 ms)
[ RUN      ] ComponentTestInterface.PatchTestTimeoutSingleHandler
[       OK ] ComponentTestInterface.PatchTestTimeoutSingleHandler (49 ms)
[ RUN      ] ComponentTestInterface.PatchTestTimeoutMultiHandler
[       OK ] ComponentTestInterface.PatchTestTimeoutMultiHandler (52 ms)
[ RUN      ] ComponentTestInterface.DeleteTestTimeoutSingleHandler
[       OK ] ComponentTestInterface.DeleteTestTimeoutSingleHandler (57 ms)
[ RUN      ] ComponentTestInterface.DeleteTestTimeoutMultiHandler
[       OK ] ComponentTestInterface.DeleteTestTimeoutMultiHandler (42 ms)
[ RUN      ] ComponentTestInterface.PostTestTimeoutSingleHandler
[       OK ] ComponentTestInterface.PostTestTimeoutSingleHandler (46 ms)
[ RUN      ] ComponentTestInterface.PostTestTimeoutMultiHandler
[       OK ] ComponentTestInterface.PostTestTimeoutMultiHandler (58 ms)
[ RUN      ] ComponentTestInterface.Post100Mbs
[       OK ] ComponentTestInterface.Post100Mbs (964 ms)
[ RUN      ] ComponentTestInterface.Post100MbsStringView
[       OK ] ComponentTestInterface.Post100MbsStringView (775 ms)
[ RUN      ] ComponentTestInterface.DeleteHelloWorldWithPayloadJson
[       OK ] ComponentTestInterface.DeleteHelloWorldWithPayloadJson (14 ms)
[ RUN      ] ComponentTestInterface.DeleteHelloWorldWithPayloadRaw
[       OK ] ComponentTestInterface.DeleteHelloWorldWithPayloadRaw (24 ms)
[ RUN      ] ComponentTestInterface.DeleteWithCustomHeaderAndPayload
[       OK ] ComponentTestInterface.DeleteWithCustomHeaderAndPayload (38 ms)
[----------] 55 tests from ComponentTestInterface (3551 ms total)

[----------] 12 tests from ComponentTestInternalParameters
[ RUN      ] ComponentTestInternalParameters.DownloadFileEmptyInvalidUrl
[       OK ] ComponentTestInternalParameters.DownloadFileEmptyInvalidUrl (23 ms)
[ RUN      ] ComponentTestInternalParameters.DownloadFileEmptyInvalidUrl2
[       OK ] ComponentTestInternalParameters.DownloadFileEmptyInvalidUrl2 (26 ms)
[ RUN      ] ComponentTestInternalParameters.GetError
[       OK ] ComponentTestInternalParameters.GetError (44 ms)
[ RUN      ] ComponentTestInternalParameters.PostError
[       OK ] ComponentTestInternalParameters.PostError (47 ms)
[ RUN      ] ComponentTestInternalParameters.PutError
[       OK ] ComponentTestInternalParameters.PutError (37 ms)
[ RUN      ] ComponentTestInternalParameters.DeleteError
[       OK ] ComponentTestInternalParameters.DeleteError (44 ms)
[ RUN      ] ComponentTestInternalParameters.ExecuteGetNoUrl
[       OK ] ComponentTestInternalParameters.ExecuteGetNoUrl (29 ms)
[ RUN      ] ComponentTestInternalParameters.ExecutePostNoUrl
[       OK ] ComponentTestInternalParameters.ExecutePostNoUrl (45 ms)
[ RUN      ] ComponentTestInternalParameters.ExecutePutNoUrl
[       OK ] ComponentTestInternalParameters.ExecutePutNoUrl (63 ms)
[ RUN      ] ComponentTestInternalParameters.ExecuteDeleteNoUrl
[       OK ] ComponentTestInternalParameters.ExecuteDeleteNoUrl (42 ms)
[ RUN      ] ComponentTestInternalParameters.MultipleThreads
[       OK ] ComponentTestInternalParameters.MultipleThreads (2064 ms)
[ RUN      ] ComponentTestInternalParameters.MultipleThreadsWithMultiHandlers
[       OK ] ComponentTestInternalParameters.MultipleThreadsWithMultiHandlers (2136 ms)
[----------] 12 tests from ComponentTestInternalParameters (4611 ms total)

[----------] Global test environment tear-down
[==========] 67 tests from 2 test suites ran. (8163 ms total)
[  PASSED  ] 67 tests.

╭─root@ca37659e68c4 /workspaces/devContainer/wazuh-http-request/build ‹bug/77-delete-requests-do-not-send-payload●› 
╰─# ./test/unit/urlrequest_unit_test          
[==========] Running 31 tests from 3 test suites.
[----------] Global test environment set-up.
[----------] 7 tests from cURLHandlerCacheTest
[ RUN      ] cURLHandlerCacheTest.SingleHandlerCreation
[       OK ] cURLHandlerCacheTest.SingleHandlerCreation (1 ms)
[ RUN      ] cURLHandlerCacheTest.MultiHandlerCreation
[       OK ] cURLHandlerCacheTest.MultiHandlerCreation (0 ms)
[ RUN      ] cURLHandlerCacheTest.SingleHandlerInMultipleThreads
[       OK ] cURLHandlerCacheTest.SingleHandlerInMultipleThreads (3 ms)
[ RUN      ] cURLHandlerCacheTest.MultiHandlerInMultipleThreads
[       OK ] cURLHandlerCacheTest.MultiHandlerInMultipleThreads (15 ms)
[ RUN      ] cURLHandlerCacheTest.SingleHandlerAndMultiHandlerInTheSameThread
[       OK ] cURLHandlerCacheTest.SingleHandlerAndMultiHandlerInTheSameThread (2 ms)
[ RUN      ] cURLHandlerCacheTest.TwoSingleHandlerInTheSameThread
[       OK ] cURLHandlerCacheTest.TwoSingleHandlerInTheSameThread (0 ms)
[ RUN      ] cURLHandlerCacheTest.TwoMultiHandlerInTheSameThread
[       OK ] cURLHandlerCacheTest.TwoMultiHandlerInTheSameThread (0 ms)
[----------] 7 tests from cURLHandlerCacheTest (25 ms total)

[----------] 4 tests from SecureCommunicationTest
[ RUN      ] SecureCommunicationTest.CACertificate
[       OK ] SecureCommunicationTest.CACertificate (0 ms)
[ RUN      ] SecureCommunicationTest.BasicAuth
[       OK ] SecureCommunicationTest.BasicAuth (0 ms)
[ RUN      ] SecureCommunicationTest.ClientAuthentication
[       OK ] SecureCommunicationTest.ClientAuthentication (0 ms)
[ RUN      ] SecureCommunicationTest.BasicAndClientAuth
[       OK ] SecureCommunicationTest.BasicAndClientAuth (0 ms)
[----------] 4 tests from SecureCommunicationTest (0 ms total)

[----------] 20 tests from UrlRequestUnitTest
[ RUN      ] UrlRequestUnitTest.GetFileHttp
[       OK ] UrlRequestUnitTest.GetFileHttp (8 ms)
[ RUN      ] UrlRequestUnitTest.HttpSecureConnection
[       OK ] UrlRequestUnitTest.HttpSecureConnection (4 ms)
[ RUN      ] UrlRequestUnitTest.HttpSecureConnectionBasicAuth
[       OK ] UrlRequestUnitTest.HttpSecureConnectionBasicAuth (1 ms)
[ RUN      ] UrlRequestUnitTest.HttpSecureConnectionClientAuth
[       OK ] UrlRequestUnitTest.HttpSecureConnectionClientAuth (2 ms)
[ RUN      ] UrlRequestUnitTest.HttpSecureConnectionBasicAndClientAuth
[       OK ] UrlRequestUnitTest.HttpSecureConnectionBasicAndClientAuth (2 ms)
[ RUN      ] UrlRequestUnitTest.GetFileWithUnixSocket
[       OK ] UrlRequestUnitTest.GetFileWithUnixSocket (1 ms)
[ RUN      ] UrlRequestUnitTest.GetApiRequest
[       OK ] UrlRequestUnitTest.GetApiRequest (1 ms)
[ RUN      ] UrlRequestUnitTest.PostApiRequest
[       OK ] UrlRequestUnitTest.PostApiRequest (1 ms)
[ RUN      ] UrlRequestUnitTest.PostApiRequestWithPostFields
[       OK ] UrlRequestUnitTest.PostApiRequestWithPostFields (1 ms)
[ RUN      ] UrlRequestUnitTest.PostApiRequestWithPostFieldsAndUnixSocket
[       OK ] UrlRequestUnitTest.PostApiRequestWithPostFieldsAndUnixSocket (1 ms)
[ RUN      ] UrlRequestUnitTest.PutApiRequest
[       OK ] UrlRequestUnitTest.PutApiRequest (1 ms)
[ RUN      ] UrlRequestUnitTest.DeleteApiRequest
[       OK ] UrlRequestUnitTest.DeleteApiRequest (1 ms)
[ RUN      ] UrlRequestUnitTest.DeleteApiRequestWithPostFields
[       OK ] UrlRequestUnitTest.DeleteApiRequestWithPostFields (3 ms)
[ RUN      ] UrlRequestUnitTest.DeleteApiRequestWithPostFieldsAndUnixSocket
[       OK ] UrlRequestUnitTest.DeleteApiRequestWithPostFieldsAndUnixSocket (3 ms)
[ RUN      ] UrlRequestUnitTest.BadConstructorDelete
[       OK ] UrlRequestUnitTest.BadConstructorDelete (0 ms)
[ RUN      ] UrlRequestUnitTest.BadConstructorGet
[       OK ] UrlRequestUnitTest.BadConstructorGet (0 ms)
[ RUN      ] UrlRequestUnitTest.BadConstructorPost
[       OK ] UrlRequestUnitTest.BadConstructorPost (0 ms)
[ RUN      ] UrlRequestUnitTest.BadConstructorPut
[       OK ] UrlRequestUnitTest.BadConstructorPut (0 ms)
[ RUN      ] UrlRequestUnitTest.HttpsCertExists
[       OK ] UrlRequestUnitTest.HttpsCertExists (4 ms)
[ RUN      ] UrlRequestUnitTest.HttpsNoCertNotExists
[       OK ] UrlRequestUnitTest.HttpsNoCertNotExists (1 ms)
[----------] 20 tests from UrlRequestUnitTest (45 ms total)

[----------] Global test environment tear-down
[==========] 31 tests from 3 test suites ran. (72 ms total)
[  PASSED  ] 31 tests.

@NahuFigueroa97
NahuFigueroa97 force-pushed the bug/77-delete-requests-do-not-send-payload branch from 8fcff7b to 7142a19 Compare December 24, 2025 14:02
Comment thread src/HTTPRequest.cpp
Comment thread src/UNIXSocketRequest.cpp
Comment thread src/UNIXSocketRequest.cpp

@LucioDonda LucioDonda left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to add some unit test cases to UrlRequestUnitTest and if possible also some component tests to ComponentTestInterface

@matigarciadev matigarciadev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jam300

jam300 commented Dec 27, 2025

Copy link
Copy Markdown

LGTM!

@LucioDonda LucioDonda left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@juliancnn juliancnn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@juliancnn
juliancnn merged commit 1a98c1a into 1.0.0 Dec 29, 2025
2 checks passed
@juliancnn
juliancnn deleted the bug/77-delete-requests-do-not-send-payload branch December 29, 2025 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DELETE requests do not send payload even when data is provided in TRequestParameters

5 participants