handle optional path and query parameters

this commit brought to you by Old Chub Scotch Ale.