Search found 3 matches

by jonny
Thu May 26, 2022 1:25 pm
Forum: General Discussion and Questions
Topic: urequest.post not working in micropython
Replies: 6
Views: 5366

Re: urequest.post not working in micropython

yeah thank you, I have figured out why I was getting the 302 message and that that is the normal expected response, The problem is I am still getting a 400 bad request error when running the code provided in the original question and no matter how many urequest examples I look at, I cannot seem to f...
by jonny
Wed May 25, 2022 4:32 pm
Forum: General Discussion and Questions
Topic: urequest.post not working in micropython
Replies: 6
Views: 5366

Re: urequest.post not working in micropython

Ok, so I have checked everything and have found out the problem, I just do not know how to fix it. if I try: import urequests as requests x = requests.get('https://www.google.com') print(x.status_code) it works fine and gives me a 200 but when i try another website like spotify: import urequests as ...
by jonny
Mon May 23, 2022 2:40 pm
Forum: General Discussion and Questions
Topic: urequest.post not working in micropython
Replies: 6
Views: 5366

urequest.post not working in micropython

hello, I am trying to use the spotify api with my nodemcu esp8266 and it works fine in python but not in micropython.. when I run a post request like this: import urequests as requests response = requests.post("http://jsonplaceholder.typicode.com/posts", data = "some dummy content") print(response.t...