common request parsing