ylbtech-Java-Class-C:org.springframework.http.HttpEntity
1.返回顶部
1.1、
import org.springframework.http.HttpEntity;
1.2、

//封装成一个请求对象
HttpEntity entity = new HttpEntity(requestParam, headers);

1.3、
2.返回顶部
 
3.返回顶部
 
4.返回顶部
1、
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
// package org.springframework.http; import org.springframework.lang.Nullable;
import org.springframework.util.MultiValueMap;
import org.springframework.util.ObjectUtils; public class HttpEntity<T> {
public static final HttpEntity<?> EMPTY = new HttpEntity();
private final HttpHeaders headers;
@Nullable
private final T body; protected HttpEntity() {
this((Object)null, (MultiValueMap)null);
} public HttpEntity(T body) {
this(body, (MultiValueMap)null);
} public HttpEntity(MultiValueMap<String, String> headers) {
this((Object)null, headers);
} public HttpEntity(@Nullable T body, @Nullable MultiValueMap<String, String> headers) {
this.body = body;
HttpHeaders tempHeaders = new HttpHeaders();
if (headers != null) {
tempHeaders.putAll(headers);
} this.headers = HttpHeaders.readOnlyHttpHeaders(tempHeaders);
} public HttpHeaders getHeaders() {
return this.headers;
} @Nullable
public T getBody() {
return this.body;
} public boolean hasBody() {
return this.body != null;
} public boolean equals(@Nullable Object other) {
if (this == other) {
return true;
} else if (other != null && other.getClass() == this.getClass()) {
HttpEntity<?> otherEntity = (HttpEntity)other;
return ObjectUtils.nullSafeEquals(this.headers, otherEntity.headers) && ObjectUtils.nullSafeEquals(this.body, otherEntity.body);
} else {
return false;
}
} public int hashCode() {
return ObjectUtils.nullSafeHashCode(this.headers) * 29 + ObjectUtils.nullSafeHashCode(this.body);
} public String toString() {
StringBuilder builder = new StringBuilder("<");
if (this.body != null) {
builder.append(this.body);
builder.append(',');
} builder.append(this.headers);
builder.append('>');
return builder.toString();
}
}
2、
5.返回顶部
 
 
6.返回顶部
 
作者:ylbtech
出处:http://ylbtech.cnblogs.com/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。

最新文章

  1. keypress,keydown,keyup,charCode,keyCode兼容性问题
  2. MariaDB Galera Cluster 部署
  3. Dispatcher中Invoke与BeginInvoke
  4. UVA 1600
  5. 在Java项目中整合Scala
  6. 第3.3.4节 创建高级图形之RenderScript(二)
  7. oracle substr功能
  8. 使用 Google
  9. laravel之路由和控制器与视图
  10. async/await处理异步
  11. linux 入门学习
  12. es6入门2--对象解构赋值
  13. JAVA的值传递问题
  14. 在BootStrap的modal中使用Select2搜索框无法输入
  15. Android Autosizing TextViews
  16. jquery 之ajax,get,post异步请求简单代码模版
  17. jdk1.8使用的url和driverName的改变
  18. [Lua]table(一):打印与复制
  19. OpenWrt上搭建纯L2TP服务器[ZT]
  20. POJ 1988&amp;&amp;2236

热门文章

  1. bzoj 2561
  2. SP8222 NSUBSTR - Substrings(后缀自动机+dp)
  3. vc/atlmfc/include/afx.h(24) : fatal error C1189: #error : Building MFC application with /MD[d] (CRT
  4. 在一台机上搭建多个MYSQL并设置主从
  5. Dubbo入门到精通学习笔记(二):Dubbo管理控制台、使用Maven构建Dubbo的jar包、在Linux上部署Dubbo privider服务(shell脚本)、部署consumer服务
  6. System之nanoTime函数
  7. 4. Jmeter主界面的介绍
  8. 如何从ST官网下载STM32标准库
  9. CSS:Stacking Context
  10. Flask数据库的基本操作