implementation of request() along with documentation