[Python] Node server doesnt receive the JSON file I send him

Discussão em 'Python' iniciado por Stack, Abril 22, 2025.

  1. Stack

    Stack Membro Participativo

    i'm trying to send a post request to my express server using python, this is my code:

    import requests


    print("started");
    URL = "http://localhost:5000/api/chat"

    PARAMS = {'ID':"99","otherID":"87",'chat':[{"senderName":"tom","text":"helloworld"}]}

    r = requests.post(url = URL, data = PARAMS)

    pastebin_url = r.text
    print("The pastebin URL is:%s"%pastebin_url)


    but when I recieve the call, I get an empty object on my Node server, am I missing something? (With postman it works fine so its not the server)

    Continue reading...

Compartilhe esta Página