Refresh param should be passed as query part of request not data. See: http://www.elasticsearch.org/guide/reference/api/admin-indices-flush.html