简体   繁体   English

Javascript:请参阅POST和GET信息

[英]Javascript: see POST and GET info

Today I had a situation, when I want to send some info from my Tornado backend to frontend with backbone. 今天我遇到了一种情况,当我想从龙卷风后端向带有骨干网的前端发送一些信息时。 And I have the question - can I receive GET or POST info with my client-side javascript and why? 我有一个问题-我可以使用客户端JavaScript接收GET或POST信息,为什么?

TIA! TIA!

How are you accessing the server? 您如何访问服务器? using AJAX i presume. 我假设使用AJAX。 You can examine the response headers in javascript: 您可以在javascript中检查响应标头:

var request = new XMLHttpRequest();

// do your GET request

//in the callback 
request.getAllResponseHeaders().toLowerCase();

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

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