Cross-domain JSON request?

后端 未结 2 1344
臣服心动
臣服心动 2020-12-09 18:26

Question:

I\'m trying to use JSON accross domains, but all i find is JSON parsers, which I don\'t need...
I\'ve read that it\'s possible to do cross-domain requ

2条回答
  •  感情败类
    2020-12-09 19:00

    JSON is just a serialization method. There is no relation whatsoever between the method of the serialization and the question of whether or not the browser will try to stop you from accessing data across domains. (This explains why you are only finding parsers - there is nothing to JSON, except encoding and decoding it).

    XMLHTTPRequest is just named XML HTTPRequest. It doesn't really have anything to do with XML. It can be used to send text data, data encoded in JSON, or any others serialization method.

    There are several methods to access data cross domain. one described in David Hedlund's answer. Others can be found in answers to similar questions (see here and here).

提交回复
热议问题