how do I get nginx to forward HTTP POST requests via rewrite?

Try using the reverse proxy support instead. An example location section would be:

location / {
  proxy_pass      http://localhost:8080;
  proxy_redirect  http://localhost:8080/ /;
  proxy_read_timeout 60s;

  # May not need or want to set Host. Should default to the above hostname.
  proxy_set_header          Host            $host;
  proxy_set_header          X-Real-IP       $remote_addr;
  proxy_set_header          X-Forwarded-For $proxy_add_x_forwarded_for;
}

This example will pass through all requests to this server block to a second server running on localhost:8080. This preserves POST's and should also preserve other request types too if it ever becomes an issue.

The issue is that external redirects will never resend POST data. This is written into the HTTP spec (check the 3xx section). Any client that does do this is violating the spec.

If the 301/302 status code is received in response to a request other than GET or HEAD, the user agent MUST NOT automatically redirect the request unless it can be confirmed by the user, since this might change the conditions under which the request was issued.

I'm fairly sure that most browsers implement this by simply forcing the redirected request to be a GET request. Theoretically, the spec does allow for a browser that would ask the user whether to redirect the POST data, but I'm unaware of any that currently do.