parsing headers and query strings from body or url