creating local object before sending http request