title: MicroPython urequests.post failures
body: <p>I'm trying to receive notifications on my (Android) mobile device from an ESP8266 MCU running MicroPython. For this reason I subscribed to a couple of online services exposing some APIs for this task, Pushbullet, and Pushed, and I installed the matching apps on my device.</p>
  
  <p>This is what I'm trying:</p>
  
  <p>Pushbullet:</p>
  
  <pre class="lang-py prettyprint-override"><code>import json
  import urequests
  
  body = "Test Notification"
  title = "Pushbullet"
  data_sent = {"type": "note", "title": title, "body": body}
  API_KEY = 'xxxxxxxxxxxxxxxxxxxxxxxxxxx'
  
  pb_headers = {
      'Authorization': 'Bearer ' + API_KEY, 
      'Content-Type': 'application/json'
  }
  
  r = urequests.post(
      'https://api.pushbullet.com/v2/pushes', 
      data=json.dumps(data_sent), 
      headers=pb_headers
  )
  
  print(r)
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>ssl_handshake_status: -256
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 11, in &lt;module&gt;
    File "urequests.py", line 104, in post
    File "urequests.py", line 56, in request
  OSError: [Errno 5] EIO
  </code></pre>
  
  <p>Pushed:</p>
  
  <pre class="lang-py prettyprint-override"><code>import json
  import urequests
  
  payload = {
    "app_key": "xxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "app_secret": "xxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "target_type": "app",
    "content": "Remote Mic MCU test from ESP8266"
  }
  
  r = urequests.post("https://api.pushed.co/1/push", data=payload)
  print(r)
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;stdin&gt;", line 8, in &lt;module&gt;
    File "urequests.py", line 104, in post
    File "urequests.py", line 74, in request
  TypeError: object with buffer protocol required
  </code></pre>
  
  <p>Searching for these errors, doesn't get me anywhere useful.</p>
  
  <p>The exact same code snippets work OK on my Linux box (using <code>requests</code> instead of <code>urequests</code>), but I understand that <code>urequests</code> may have some limitations.</p>
  
  <p>Do you have any hint on how to fix this?</p>