If i have a python json and i want to assigned a variable to one of the values in the python json,
if booking.hotel.feedback_option == True:
name = request.GET.get('firstname')
email= request.GET.get('email')
values = """
{
"Name" ="'+str(name)+'",
"HasExternalDoubleOptIn": true,
"Email"="'+str(email)+'",
"CustomFields": [
"Checkout=2018-09-07"
]
}
"""
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
data = values.encode()
req = Request('https://api.moosend.com/v3/subscribers/7c343r9ad-er56-4c51-810e-74e27f8505c2/subscribe.json?apikey=77f343914-4t3c-4d61-8435-9346f5b4adf6', data=data, headers=headers)
response_body = urlopen(req).read()
valuescoming from? Or is it something you intend to send?