How to use fetch correctly?
问题 I'm working on my application now. I'm trying to use fetch for login page, but I don't really understand how to use fetch even reading some example of code. Could anyone please help me get that? For instance, I have to use these information to login to my server. username: "user" password: "1234" then I want server return that login success or not and return a token if loging in is success I tried to used this code render() { return ( fetch('mysite', { method: 'POST', body: JSON.stringify({