package com.microservices.common.httpClient.domain;

/**
 * @author otto
 */

import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;

import java.net.URI;

/**
 * HttpClient自带的HttpDelete方法是不支持上传body的，所以重写delete方法
 *
 * @author otto
 */
public class CustomHttpDelete extends HttpEntityEnclosingRequestBase {

    public static final String METHOD_NAME = "DELETE";

    public String getMethod() {
        return METHOD_NAME;
    }

    public CustomHttpDelete(final String uri) {
        super();
        setURI(URI.create(uri));
    }

    public CustomHttpDelete(final URI uri) {
        super();
        setURI(uri);
    }

    public CustomHttpDelete() {
        super();
    }
}
