JJMC89 added a comment.
In T326046#8494108 <https://phabricator.wikimedia.org/T326046#8494108>, @Dimpizzy wrote: > Is there a way to output and see the exact request sent to the server when it serves up HTML instead of JSON? pywikibot/data/api/_requests.py#L715-L739 <https://github.com/wikimedia/pywikibot/blob/7.7.2/pywikibot/data/api/_requests.py#L715-L739> is where pywikibot outputs the warning for the non-JSON response. (You can also access the response for any request earliest after pywikibot/comms/http.py#L384-L386 <https://github.com/wikimedia/pywikibot/blob/7.7.2/pywikibot/comms/http.py#L384-L386>.) response.request <https://requests.readthedocs.io/en/latest/api/#requests.Response.request> is the PreparedRequest <https://requests.readthedocs.io/en/latest/api/#requests.Response.request> that was sent to the server. Look at its properties (headers/url). TASK DETAIL https://phabricator.wikimedia.org/T326046 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Xqt, JJMC89 Cc: JJMC89, Xqt, Tommy_Kronkvist, Aklapper, Reception123, pywikibot-bugs-list, Dimpizzy, Adamm71, Jersione, Hellket777, LisafBia6531, 786, Biggs657, PotsdamLamb, Jyoo1011, JohnsonLee01, Juan90264, SHEKH, Dijkstra, Alter-paule, Beast1978, Un1tY, Khutuck, Zkhalido, Hook696, Kent7301, joker88john, Viztor, CucyNoiD, Wenyi, Gaboe420, Giuliamocci, Cpaulf30, Af420, Bsandipan, Tbscho, MayS, Framawiki, Lewizho99, Mdupont, Maathavan, Dvorapa, Altostratus, Neuronton, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Krenair
_______________________________________________ pywikibot-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected]
