简体   繁体   English

什么相当于 Spring RestTemplate 中的 jQuery.ajax dataType raw

[英]What is equivalent of jQuery.ajax dataType raw in Spring RestTemplate

I have jquery ajax call as below我有 jquery ajax 调用如下

jQuery.ajax(url, {
        headers  : header_settings,
        type     : "POST",
        dataType : "raw",
        data     : JSON.stringify(data),
        success  : callback,
        error    : callback
      });

How we should specify dataType raw for Spring RestTemplate我们应该如何为 Spring RestTemplate 指定 dataType raw

RestTemplate restTemplate = new RestTemplate();
.....
    restTemplate.postForObject(uri, request, String.class);

Intelligent Guess is the default and usually works for me. Intelligent Guess 是默认设置,通常对我有用。 You can just delete the dataType line.您可以删除 dataType 行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM