python requests module - set key to null -
from requests documentation :
remove value dict parameter
sometimes you’ll want omit session-level keys dict parameter. this, set key’s value none in method-level parameter. automatically omitted.
i need data key's value none take json value null instead of being removed. possible ?
edit : seems happen request data keys. while not session-level behaviour of removing still same.
there no session-level json parameter, merging rules don't apply.
in other words, json
keyword argument session.request()
method passed through unchanged, none
values in structure not result in keys being removed.
the same applies data
, there no session-level version of parameter, no merging takes place. if data
set dictionary, keys value set none
ignored. set value ''
if need keys included empty value.
the rule apply when merging headers
, params
, hooks
, proxies
.
Comments
Post a Comment