I'm just trying to LogIn with my UserAgent on https://api.opensubtitles.org/xml-rpc
It was working before (didn't try for a long time though).
I found that I had to change my password first to make curl works.
So now, curl request gives me a 200,
while fetch request is not (due to CORS) :
Access-Control-Allow-Origin == Missing Header
CURL REQUEST :
Code: Select all
curl 'https://api.opensubtitles.org/xml-rpc' \
-H 'Accept: text/xml' \
-H 'Referer: http://localhost:6868/' \
-H 'Content-Type: text/xml' \
--data-raw '<?xml version="1.0"?><methodCall><methodName>LogIn</methodName><params><param><value><string>REDACTED</string></value></param><param><value><string>REACTED</string></value></param><param><value><string>en</string></value></param><param><value><string>willbaz</string></value></param></params></methodCall>' \
--compressed
FETCH REQUEST :
Code: Select all
fetch("https://api.opensubtitles.org/xml-rpc", {
"headers": {
"accept": "text/xml",
"content-type": "text/xml",
},
"referrer": "http://localhost:6868/",
"referrerPolicy": "strict-origin-when-cross-origin",
"body": "<?xml version=\"1.0\"?><methodCall><methodName>LogIn</methodName><params><param><value><string>REDACTED</string></value></param><param><value><string>REACTED</string></value></param><param><value><string>en</string></value></param><param><value><string>REDACTED</string></value></param></params></methodCall>",
"method": "POST",
});
Could you add the
Code: Select all
Access-Control-Allow-Origin: *
Thanks !