zoukankan      html  css  js  c++  java
  • webapi返回不带引号的字符串,解决自动加双引号的问题

    返回类型改为HttpResponseMessage类型

    1 [Route("api/TestControllers/test")]
    2 [HttpGet]
    3 public HttpResponseMessage Test()
    4 {
    5     HttpResponseMessage responseMessage = new HttpResponseMessage { Content = new StringContent("你要返回的字符串", Encoding.GetEncoding("UTF-8"), "text/plain") };
    6          
    7     return responseMessage;
    8 }
  • 相关阅读:
    *Path Sum II
    *Path Sum
    Same Tree
    Symmetric Tree
    hprof网络连接
    gc
    java thread park
    sudo !!
    ecb gud
    jpda
  • 原文地址:https://www.cnblogs.com/dansediao/p/5643520.html
Copyright © 2011-2022 走看看