src/HTTPHandler.h
branchv_0
changeset 25 dbeae485a3fd
parent 23 33f8162a4971
child 27 b679797949e9
--- a/src/HTTPHandler.h	Mon Apr 04 23:07:31 2022 +0200
+++ b/src/HTTPHandler.h	Tue Apr 05 00:06:12 2022 +0200
@@ -212,6 +212,8 @@
 		if (attributeName == L"id") requestId = value;
 		else if (attributeName == L"url") request.url = convertor.to_bytes(value);
 		else if (attributeName == L"method") request.method = parseMethod(value);
+		else if (attributeName == L"text") request.body = convertor.to_bytes(value);
+		else if (attributeName == L"data") request.body = "TODO: read binary data: " + convertor.to_bytes(value); // TODO: read hex/binary request body
 		else if (isHeaderAttribute(attributeName)) appendRequestHeader(fetchHeaderName(attributeName), value);
 		else throw std::invalid_argument("Unsupported attribute in the header relation: " + convertor.to_bytes(attributeName + L" = " + value));