chore(code) remove commented out code
refact: extract the definition of the error handler
refact: extract definition of success handlers
refact: extract the rejectRequest method from the get method
chore: clean indentation
bug(post): promise was defined twice
refact: promote rejectPostRequest to a reusable scope
refact: extract logic into a single reject request method