Closed timmsGithub closed 2 years ago
What's the error that you get? I see one thing wrong with it right now and it's that you're using "data" instead of "body". See if replacing it fixed anything.
I'm using body now, sadly it is the same error.
2022/10/06 10:57:25 Post "https://api-mainnet.magiceden.io/v2/xc/login/v2/init": local error: tls: unexpected message
Even a get request to the website makes the same error
If the Tls is right, it should work
The request only requires a valid tls (for cloudflare), header with user-agent and content-type and the payload.
@HypePhilosophy u still there?
Hi, I recently had the time to look over it and I know what's causing the issue. Moving forward, I will add Yawning's version of utls, which addresses your issue.
Hello! I tested your tls client today and i think i'm doing something wrong!
`let options1 = { method: 'POST', cookieJar: cookieJar, data: {"address": "0xD74749E4372ec4F49CEeC554Ea09DA51e1Bc03cB"}, headers: { 'authority': 'api-mainnet.magiceden.io', 'accept': 'application/json, text/plain, /', 'accept-encoding': 'gzip, deflate, br', 'accept-language': 'de-DE,de-AT;q=0.9,de;q=0.8,en-US;q=0.7,en;q=0.6', 'content-type': 'application/json', 'origin': 'https://magiceden.io', 'referer': 'https://magiceden.io/', 'sec-ch-ua': '"Chromium";v="106", "Google Chrome";v="106", "Not;A=Brand";v="99"', 'sec-ch-ua-mobile': '?0', 'sec-ch-ua-platform': '"Windows"', 'sec-fetch-dest': 'empty', 'sec-fetch-mode': 'cors', 'sec-fetch-site': 'same-site', 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36', }, }
Normally you should get an answer similar to '{"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhENzQ3NDlFNDM3MmVjNEY0OUNFZUM1NTRFYTA5REE1MWUxQmMwM2NCIiwibm9uY2UiOiJCMXVRTC10a3lzIiwibWVzc2FnZSI6Ik1hZ2ljIEVkZW4gd2FudHMgeW91IHRvIHNpZ24gaW4gd2l0aCB5b3VyIEV0aGVyZXVG9saWN5OiBcml2YWN5LXBvbGljeS5wZGZcblxuVVJJOiBodHRwczovL21hZ2ljZWRlbi5pb1xuVmVyc2lvbjogMVxuQ2hhaW4gSUQ6IDFcbk5vbmNlOiBCMXVRTC10a3lzXG5Jc3N1ZWQgQXQ6IDIwMjItMTAtMDZUMDc6NTI6NDEuODg3WiIsImlzc3VlZEF0IjoiMjAyMi0xMC0wNlQwNzo1Mjo0MS44ODdaIiwiaWF0IjoxNjY1MDQyNzYxLCJleHAiOjE2NjUwNDI4MjF9.UVM5-LdAQ_5iqsmj9-ndZ3rA8iD2bF7DSD6ARn9BXa4","nonce":"B1uQL-tkys","message":"Magic Eden wants you to sign in with your Ethereum account: 0xD74749E4372ec4F49CEeC554Ea09DA51e1Bc03cB\n\nClick \"Sign\" or \"Approve\" only means you have proved this wallet is owned by you.\n\nThis request will not trigger any blockchain transaction or cost any gas fee.\n\nUse of our website and service are subject to our Terms of Service: https://magiceden.io/terms-of-service.pdf and Privacy Policy: https://magiceden.io/privacy-policy.pdf\\n\\nURI: https://magiceden.io\\nVersion: 1\nChain ID: 1\nNonce: B1uQL-tkys\nIssued At: 2022-10-06T07:52:41.887Z"}'
Would be wonderful if you could help me!