PySide6.QtNetwork.QHttpHeaderRangeSet¶
- class QHttpHeaderRangeSet¶
QHttpHeaderRangeSetrepresents the byte ranges of an HTTPRangeheader.Details
QHttpHeaderRangeSetholds a sequence ofQHttpHeaderRangeSpecobjects, as they appear in such a header, which RFC 9110 calls a range-set.The ranges are kept in the order in which they were given, because that is the order in which a server is asked to send them. The class does not interpret them: neither overlapping nor invalid ranges are rejected or merged.
Each range is a byte range, as defined in RFC 9110 Section 14.1.1 :
If the start is specified but the end is not (e.g., “bytes=500-“), the
QHttpHeaderRangeSpecwill havestart=500andend=std::nullopt.If the end is specified but the start is not (e.g., “bytes=-500”), the
QHttpHeaderRangeSpecwill havestart=std::nulloptandend=500, representing the last 500 bytes.If both are specified (e.g., “bytes=0-499”), the
QHttpHeaderRangeSpecwill havestart=0andend=499.
See also
QHttpHeaderRangeSpecrangeValues()setRangeValues()Synopsis¶
Methods¶
def
__init__()def
__ne__()def
__eq__()def
ranges()def
setRanges()def
swap()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
- __init__()¶
Constructs a
QHttpHeaderRangeSetobject with no ranges.- __init__(list)
- Parameters:
list –
PySequence
- __init__(other)
- Parameters:
other –
QHttpHeaderRangeSet
Creates a copy of
other.- __ne__(rhs)¶
- Parameters:
rhs –
QHttpHeaderRangeSet- Return type:
bool
- __eq__(rhs)¶
- Parameters:
rhs –
QHttpHeaderRangeSet- Return type:
bool
- ranges()¶
- Return type:
PySequence
- setRanges(list)¶
- Parameters:
list –
PySequence
- swap(other)¶
- Parameters:
other –
QHttpHeaderRangeSet
Swaps this ranges object with
other. This operation is very fast and never fails.