fixed building of request URL and post body