Refactor post request construction into its own method.