parse_response function

Process results from POST or GET