Modified the flush method to be send a POST request instead of GET.