HttpRequest.AddRange Method
Namespace: Rebex.Net
Assembly: Rebex.Http.dll (version 7.0.9083)
AddRange(Int64)
Adds HTTP Range header to the request with 'bytes' unit.
Declaration
public void AddRange(long offset)
Parameters
Type | Name | Description |
---|---|---|
Int64 | offset | The position (zero-based) at which the data starts. Negative number means the offset is relative to the end of the data. |
Examples
offset
= 100 results to "Range: bytes=100-", which means: from position 100 to the end of data.
offset
= -100 results to "Range: bytes=-100", which means: the last 100 bytes of the data.
AddRange(String, Int64)
Adds HTTP Range header to the request.
Declaration
public void AddRange(string unit, long offset)
Parameters
Type | Name | Description |
---|---|---|
String | unit | The range unit (typically 'bytes'). |
Int64 | offset | The position (zero-based) at which the data starts. Negative number means the offset is relative to the end of the data. |
Examples
offset
= 100 results to "Range: bytes=100-", which means: from position 100 to the end of data.
offset
= -100 results to "Range: bytes=-100", which means: the last 100 bytes of the data.
AddRange(Int64, Int64)
Adds HTTP Range header to the request with 'bytes' unit.
Declaration
public void AddRange(long from, long to)
Parameters
Type | Name | Description |
---|---|---|
Int64 | from | The position (zero-based) from which to start the data. |
Int64 | to | The position (inclusive) where the data ends. |
Examples
"Range: bytes=0-0" retrieves the first byte of the data.
"Range: bytes=0-9" retrieves the first ten bytes of the data.
AddRange(String, Int64, Int64)
Adds HTTP Range header to the request.
Declaration
public void AddRange(string unit, long from, long to)
Parameters
Type | Name | Description |
---|---|---|
String | unit | The range unit (typically 'bytes'). |
Int64 | from | The position (zero-based) from which to start the data. |
Int64 | to | The position (inclusive) where the data ends. |
Examples
"Range: bytes=0-0" retrieves the first byte of the data.
"Range: bytes=0-9" retrieves the first ten bytes of the data.