HttpGetWithEntity.java 572 B

1234567891011121314151617181920212223242526272829
  1. package com.kmall.admin.haikong.utils;
  2. import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
  3. import java.net.URI;
  4. /**
  5. * 带请求体的get请求
  6. * @author lhm
  7. * @createDate 2021-10-30
  8. */
  9. public class HttpGetWithEntity extends HttpEntityEnclosingRequestBase {
  10. private static final String METHOD = "GET";
  11. @Override
  12. public String getMethod() {
  13. return METHOD;
  14. }
  15. public HttpGetWithEntity() {
  16. super();
  17. }
  18. public HttpGetWithEntity(final String url) {
  19. super();
  20. setURI(URI.create(url));
  21. }
  22. }