Ask coding questions

← Back to all posts
Receive Fetch Data
ruiwenge2

I'm using fetch in JavaScript to send some data to the server(Flask). So I did:

But how do I receive and find the value of contents:html in Flask?

Answered by Coder100 [earned 5 cycles]
View Answer
Voters
ruiwenge2
Comments
hotnewtop
Coder100

you can console.log the response, like this:

ruiwenge2

@Coder100 i meant how do i get the value of html in Flask?

Coder100

@ruiwenge2 don't forget to also add the json header

https://stackoverflow.com/questions/20001229/how-to-get-posted-json-in-flask

ruiwenge2

@Coder100 thx so much!

Coder100
HoVo2

f53e1b5e-0150-4403-a932-5cabfeea1136

ruiwenge2

btw the save url is actually the url to receive data