> For the complete documentation index, see [llms.txt](https://potoyang.gitbook.io/spring-in-action-v4/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://potoyang.gitbook.io/spring-in-action-v4/di-16-zhang-shi-yong-spring-mvc-chuang-jian-rest-api/untitled-1/untitled-3.md).

# 16.4.7　POST 资源数据

在 16.2 节的表中，你会看到 RestTemplate 有三个不同类型的方法来发送 POST 请求。当你再乘上每个方法的三个不同变种，那就是有九个方法来 POST 数据到服务器端。

这些方法中有两个的名字看起来比较类似。postForObject() 和 postForEntity() 对 POST 请求的处理方式与发送 GET 请求的 getForObject() 和 getForEntity() 方法是类似的。另一个方法是 getForLocation()，它是 POST 请求所特有的。
