Bit of a noob with Flask, sorry.
My application is collecting the value from a drop down then POSTing that string to my flask function. I can (sort of) get at the data by using:
@app.route("/lookupmember", methods=["POST"])
def lookupmember():
member = request.data
print(member)
return member
Interestingly though when I print the value of "member" out there in the python function I see something like:
127.0.0.1 - - [19/Oct/2018 18:15:31] "POST /lookupmember HTTP/1.1" 200 -
b'john doe'
Whats the b'
before the name 'john doe'
?
When I console.log the same value after passing it back in the Ajax caller only the name is printed in the browser console.
I reckon the b' part might be a key or identifier applied by flask? If so, it seems reasonable that there would be a way to use that to parse to get to just the name?