code cleanup and remove cookies and headers from POST request
code cleanup