1.20.0 (2021-11-04)
Features Added
- GA
send_request
onto theazure.core.PipelineClient
andazure.core.AsyncPipelineClient
. This method takes in
requests and sends them through our pipelines. - GA
azure.core.rest
.azure.core.rest
is our new public simple HTTP library inazure.core
that users will use to create requests, and consume responses. - GA errors
StreamConsumedError
,StreamClosedError
, andResponseNotReadError
toazure.core.exceptions
. These errors
are thrown if you mishandle streamed responses from theazure.core.rest
module - add kwargs to the methods for
iter_raw
anditer_bytes
#21529 - no longer raise JSON errors if users pass in file descriptors of JSON to the
json
kwarg inHttpRequest
#21504 - Added new error type
IncompleteReadError
which is raised if peer closes the connection before we have received the complete message body.
Breaking Changes
- SansIOHTTPPolicy.on_exception returns None instead of bool.
Bugs Fixed
- The
Content-Length
header in a http response is strictly checked against the actual number of bytes in the body,
rather than silently truncating data in case the underlying tcp connection is closed prematurely.
(thanks to @jochen-ott-by for the contribution) #20412 - UnboundLocalError when SansIOHTTPPolicy handles an exception #15222
- Add default content type header of
text/plain
and content length header for users who pass unicode strings to thecontent
kwarg ofHttpRequest
in 2.7 #21550