← index #403Issue #6649
Related · high · value 0.753
QUERY · ISSUE

Can urequests use requests AuthBase classes from standard requests?

openby achapkowskiopened 2020-11-12updated 2020-11-12

Can urequests use requests AuthBase classes from standard requests?

Thanks

CANDIDATE · ISSUE

POST Request with BASIC AUTH - How to?

closedby tongclementopened 2020-11-25updated 2024-09-13

Dear all,

I am trying to implement a simple pull request with basic auth on the esp32. As seen at https://github.com/micropython/micropython-lib/pull/311, it seems like it is implemented in urequests.post and can be called by: res = urequests.post(request_url, headers={'content-type': 'application/json'}, data=post_data, auth=('username','password')).json() print(res.text).

However it seems like this doesn't work. Am I not calling this function right? There seems to be no documentation on requests in the official documentation.

Sincerely with Many Thanks,
Clement

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied