diff --git a/esp8266.py b/esp8266.py index d316a1c..3b3832f 100644 --- a/esp8266.py +++ b/esp8266.py @@ -459,7 +459,7 @@ def doHttpGet(self,host,path,user_agent="RPi-Pico", port=80): return 0, None - def doHttpPost(self,host,path,user_agent="RPi-Pico",content_type,content,port=80): + def doHttpPost(self,host,path,content_type,content,user_agent='RPi-Pico',port=80): """ This fucntion use to complete a HTTP Post operation diff --git a/example/http-get-post/main.py b/example/http-get-post/main.py index cdf0814..f611568 100644 --- a/example/http-get-post/main.py +++ b/example/http-get-post/main.py @@ -74,7 +74,7 @@ Going to do HTTP Post Operation with www.httpbin.org/post ''' post_json="{\"name\":\"Noyel\"}" - httpCode, httpRes = esp01.doHttpPost("www.httpbin.org","/post","RPi-Pico", "application/json",post_json,port=80) + httpCode, httpRes = esp01.doHttpPost("www.httpbin.org","/post", "application/json",post_json,"RPi-Pico",port=80) print("------------- www.httpbin.org/post Post Operation Result -----------------------") print("HTTP Code:",httpCode) print("HTTP Response:",httpRes) pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy