Navigation

    Welcome to the Pycom forum

    Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. Tags
    3. post
    Log in to post

    • O

      http post requests
      Getting Started • urequests post codesample • • oglucio  

      16
      1
      Votes
      16
      Posts
      1356
      Views

      J

      @oglucio it would be difficult to get the same error if you applied the fix given in that post. Can you post the error and the corresponding line of your code?
    • D

      [Solved]:FiPy socket.connect command
      FiPy • fipy post socket connect • • DDA  

      4
      0
      Votes
      4
      Posts
      1604
      Views

      jmarcelino

      Hi @dda socket.connect doesn't take a domain name, you need to resolve it first into a tuple like this - (family, type, proto, canonname, sockaddr) - which you can obtain from socket.getaddrinfo() In your case doing: s.connect(socket.getaddrinfo(addr, port)[0][-1]) should do what you want. There currently isn't a way to obtain your assigned IP address.
    • J

      Sensor JSON Post stops after a few hours
      Expansion Board • uart json post • • jimpower  

      14
      0
      Votes
      14
      Posts
      2441
      Views

      T

      @jimpower ok, so why do you get no module found when you call urequests.post now when you didn't before. I can't see all your code, just snippets. The vaious sample bits of code are being changed. Oh I see now what the problem is, when you import urequests you are importing as requests hence the module not found error. You will need to change the sample to requests.post Also as an aside why do you execfile('/flash/Wi-Fi/Wi-Fi.py') rather than importing. This seems odd thing to do.
    • J

      Serial to UART POST JSON
      Expansion Board • json post uart1 • • jimpower  

      5
      0
      Votes
      5
      Posts
      1237
      Views

      J

      @livius I added tmp = uart1.readall() and it works thanks again I managed to do this before your reply thanks again you are always very helpful
    • A

      urequests with ussl causes an OSError
      MicroPython • oserror urequests post • • ahmedkalnaggar  

      6
      1
      Votes
      6
      Posts
      2290
      Views

      D

      @this-wiederkehr You've got the point. I've tried this and finally, it works without any error. Thanks a lot.
    • D

      WiPy 2.0 to send data to dweet.io and then display the data into freeboard.io
      Discussion • wipy 2.0 post ethernet rest • • dgzgonzalez  

      1
      0
      Votes
      1
      Posts
      833
      Views

      No one has replied

    • S

      Send data requests http post. **SOLVED**
      LoPy • http post post urequest.py request.py ubidots • • scg94  

      40
      1
      Votes
      40
      Posts
      22472
      Views

      W

      @wolli01 Hier mein Code import urequests userdata = {"p1": "Wohnzimmer", "p2": "24.12.2018", "p3": "23.97"} url = 'https://Homepage.de/live1.php' res = urequests.post(url, headers={"Content-Type": "application/json", "Accept": "application/json"}, data= str(userdata)) res.close() auf den PHP Server: <?php //Sensor1 $p1 = $_GET["p1"]; $p2 = $_GET["p2"]; $p3 = $_GET["p3"]; $inhalt = array($p1, $p2, $p3); // Speichern der Datei $eintrag = implode(";", $inhalt); file_put_contents("sensor1.txt", $eintrag); ?>
    • 1 / 1