简体   繁体   English

跨站点json rpc:使用Javascript客户端的Python服务器端和Mozilla扩展

[英]Cross-site json rpc : Python server side and Mozilla extension using Javascript client side

I am building a Mozilla extension that contacts a Python application on a remote server to send and receive data. 我正在构建一个Mozilla扩展程序,该扩展程序与远程服务器上的Python应用程序联系以发送和接收数据。 The Python application can be called using xml-rpc from a Python console. 可以从Python控制台使用xml-rpc调用Python应用程序。 I am attempting to design a JSON-RPC that would contact the same application. 我正在尝试设计将与同一应用程序联系的JSON-RPC。 Developing the Python server side, which can be accessed using python console, has been easy. 开发Python服务器端(可以使用python控制台进行访问)非常容易。 However, I am having difficulties making the Mozilla extension to connect to the Python server side. 但是,我很难使Mozilla扩展连接到Python服务器端。

How do I make cross site JSON rpc calls? 如何进行跨站点JSON rpc调用? I have googled and read about many libraries, but none of them seem to work. 我已经在Google上搜索并阅读了许多图书馆的书,但是它们似乎都不起作用。 I am not sure if it is because of some origin policy or because my server side is not able to process the data. 我不确定这是由于某些原始策略还是因为我的服务器端无法处理数据。 Any help would be appreciated. 任何帮助,将不胜感激。

You can use http://mimic-xmlrpc.sourceforge.net/ js library, or just XMLHttpRequest. 您可以使用http://mimic-xmlrpc.sourceforge.net/ js库,也可以仅使用XMLHttpRequest。 I'm just with the same problem, and i'm an absolute newby with js :( 我只是有同样的问题,我绝对是js的新手:(

mimic seems grat, even if i'm having problems parsing the data returned.. 模仿似乎很高兴,即使我在解析返回的数据时遇到问题。

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

相关问题 使用JavaScript或JQuery跨站点获取JSON数据 - GETting JSON data cross-site using JavaScript or JQuery 客户端javascript或服务器端 - client side javascript or server side 跨站JavaScript问题 - Cross-site javascript problem 通过ajax调用传递的javascript对象(使用JSON序列化的客户端)的服务器端类型是什么? - What is the server side type of a javascript object, serialised client side using JSON, that is passed via an ajax call? 服务器端(python)和客户端(javascript)设计与交互 - Server-side(python) and client-side(javascript) design and interaction 如何使用javascript客户端设置Python服务器端 - How to set up Python server side with javascript client side 使用oembed-json响应(在客户端javascript中) - using oembed - json responses (in client side javascript) 在客户端javascript文件中使用JSON数据 - using JSON data in client side javascript file 是否有可能在服务器端加密并在客户端解密(使用javascript)? - is it possible to encrypt at server side and decrypt it on the client side (using javascript)? Javascript:使用变量访问服务器端变量客户端 - Javascript: access server side variable client side using variable
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM