Added HTTP-verb check and improved request logic