-- url : (string)
-- body : (string)
-- customHeaders : (dictionary<string, string>, optional)
-- returns : (promise<HttpResponse/HttpError>)

function Networking:POST(url, body, customHeaders)
	if not customHeaders then
		customHeaders = self._headers
	end

	assert(type(url) == "string", "expected 'url' to be a string")
	assert(type(body) == "string", "expected 'body' to be a string")
	assert(type(customHeaders) == "table", "expected 'customHeaders' to be a dictionary")

	local httpFunc = function()
		return self._httpImpl:RequestAsync({
			Url = url,
			Method = "POST",
			Headers = customHeaders,
			Body = body,
		})
	end

	return commonHttpHandler(url, httpFunc)
end

return Networking

