C#C
C#4y ago
İrşat

I can't get fetch body as plain string [Answered]

public async Task<JsonResult> GoogleSignin([FromBody] string googleToken)

await fetch("/Auth/GoogleSignin", {
        method: 'POST',
        headers: {
            'Accept': 'application/json',
            'Content-Type': 'application/json'
        },
        body: response.credential
    })
Normal text instead of response.credential also doesn't work. I used json stringfy, object etc, didn't work
Was this page helpful?