You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sdk/core/azure-core/CHANGELOG.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,11 @@
4
4
5
5
### Features Added
6
6
7
+
- GA `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in
8
+
requests and sends them through our pipelines.
9
+
- GA `azure.core.rest`. `azure.core.rest` is our new public simple HTTP library in `azure.core` that users will use to create requests, and consume responses.
10
+
- GA errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors
11
+
are thrown if you mishandle streamed responses from the `azure.core.rest` module
7
12
- add kwargs to the methods for `iter_raw` and `iter_bytes`#21529
8
13
- Added new error type `IncompleteReadError` which is raised if peer closes the connection before we have received the complete message body.
The HttpRequest and HttpResponse objects represent a generic concept of HTTP request and response constructs and are in no way tied to a particular transport or HTTP library.
197
+
The `HttpRequest` and `HttpResponse` objects represent a generic concept of HTTP request and response constructs and are in no way tied to a particular transport or HTTP library.
197
198
198
-
The HttpRequest has the following API. It does not vary between transports:
199
+
The `HttpRequest` has the following API. It does not vary between transports:
"""Iterates over the response's bytes. Will decompress in the process."""
299
+
300
+
```
301
+
302
+
Async calls to networks will return an `AsyncHttpResponse` instead. It shares most of its properties with an `HttpResponse` with the following exceptions:
264
303
265
304
```python
266
-
classHttpResponse(object):
267
-
268
-
def__init__(self, request, internal_response):
269
-
self.request = request
270
-
self.internal_response = internal_response # The object returned by the HTTP library
271
-
self.status_code =None
272
-
self.headers = CaseInsensitiveDict()
273
-
self.reason =None
274
-
self.content_type =None
275
-
276
-
defbody(self):
277
-
"""Return the whole body as bytes in memory."""
278
-
279
-
deftext(self, encoding=None):
280
-
"""Return the whole body as a string."""
281
-
282
-
defstream_download(self, pipeline, **kwargs):
283
-
"""Generator for streaming request body data.
284
-
Should be implemented by sub-classes if streaming download
285
-
is supported.
286
-
For the AsyncHttpResponse object this function will return
287
-
and asynchronous generator.
288
-
"""
289
-
290
-
defparts(self):
291
-
"""An iterator of parts if content-type is multipart/mixed.
292
-
For the AsyncHttpResponse object this function will return
0 commit comments