@
5had0w #69
你可以试试下面这个,第一个 http 请求是成功的,第二个重定向是因为跨域才报错。所以发起 http 请求完全没问题。
data:text/html;base64,PCFET0NUWVBFIGh0bWw+CjxodG1sIGxhbmc9ImVuIj4KPGhlYWQ+CiAgICA8bWV0YSBjaGFyc2V0PSJVVEYtOCI+CiAgICA8bWV0YSBuYW1lPSJ2aWV3cG9ydCIgY29udGVudD0id2lkdGg9ZGV2aWNlLXdpZHRoLCBpbml0aWFsLXNjYWxlPTEuMCI+CiAgICA8dGl0bGU+R0VUIFJlcXVlc3QgQnV0dG9uPC90aXRsZT4KICAgIDxzY3JpcHQ+CiAgICAgICAgZnVuY3Rpb24gc2VuZFJlcXVlc3QoKSB7CiAgICAgICAgICAgIGZldGNoKCdodHRwOi8vd3d3LmJhaWR1LmNvbScpCiAgICAgICAgICAgICAgICAudGhlbihyZXNwb25zZSA9PiByZXNwb25zZS50ZXh0KCkpCiAgICAgICAgICAgICAgICAudGhlbihkYXRhID0+IHsKICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhkYXRhKTsKICAgICAgICAgICAgICAgICAgICBhbGVydCgnR0VUIHJlcXVlc3QgdG8gQmFpZHUgd2FzIHN1Y2Nlc3NmdWwhJyk7CiAgICAgICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgLmNhdGNoKGVycm9yID0+IHsKICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKCdFcnJvcjonLCBlcnJvcik7CiAgICAgICAgICAgICAgICAgICAgYWxlcnQoJ1JlcXVlc3QgZmFpbGVkJyk7CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICA8L3NjcmlwdD4KPC9oZWFkPgo8Ym9keT4KICAgIDxidXR0b24gb25jbGljaz0ic2VuZFJlcXVlc3QoKSI+Q2xpY2sgdG8gU2VuZCBHRVQgUmVxdWVzdCB0byBCYWlkdTwvYnV0dG9uPgo8L2JvZHk+CjwvaHRtbD4K