Exemplo n.º 1
0
def receive():
    """Respond to POST data received from SMSified."""
    if request.method == 'POST':
        data = json.loads(request.data)
        text = data['inboundSMSMessageNotification']['inboundSMSMessage']
        process(text)
    return "Success!"
Exemplo n.º 2
0
def receive():
    """Respond to POST data received from SMSified."""
    if request.method == 'POST':
        data = json.loads(request.data)
        text = data['inboundSMSMessageNotification']['inboundSMSMessage']
        process(text)
    return "Success!"
Exemplo n.º 3
0
def issue():
    """Receive an incoming SMS message issue."""
    if request.method == "POST":
        try:
            data = loads(request.data)
            text = data["inboundSMSMessageNotification"]["inboundSMSMessage"]
        except:
            return "Error."
        finally:
            process(text)
            return "Success!"
    return "Not a POST request."
Exemplo n.º 4
0
def issue():
    """Receive an incoming SMS message issue."""
    if request.method == 'POST':
        try:
            data = loads(request.data)
            text = data['inboundSMSMessageNotification']['inboundSMSMessage']
        except:
            return "Error."
        finally:
            process(text)
            return 'Success!'
    return "Not a POST request."