vue axios跨域请求 response怎么发送json数据?

response怎么发送json数据?首先,以map/string/XML格式封装数据。例如,string putdata=“这是我要发送的数据”jsonobject JSON=new jsonobj

response怎么发送json数据?

首先,以map/string/XML格式封装数据。例如,string putdata=“这是我要发送的数据”jsonobject JSON=new jsonobject()json.put文件(“datas”,putData)打印输出=响应.getWriter() 输出.println( json.toString())