Download resources

Request format: GET

URL: http://ota.heclouds.com/ota/south/download/{token}

http request parameter

Name Format Required or not Description
s_id string No Optional, base station id, e.g. s_id=1212

http header

Name Format Required or not Description
Range string No Fragment information, if there is no Range field, it returns to all data by default.

Description

Header Range field explanation: Range=start-end, at present only following modes are supported:

 1. Range=start-,get the data from start+1 byte to the last one; for instance:
     Range=0-, get all data.
    Range=2-, get the data from the third to the last one.
    Note: If start>= total length of the file, then start=0 by default.
 2. Range=start-end, get the data from the byte of start+1 to that of end+1; for instance:
    Range=0-99, get the first 100 bytes.
    Note: when end>= total length of file (len), then end=len-1 by default and start is set to be 0.
 3. Range=-end, get the data of the last end bytes; for instance:
    Range=-100, get the data of the last 100 bytes.
    Note: when end> total length of file (len), then end=len (get           the whole file) by default.
 4. If head Range doesn’t exist or Range is not uploaded according to above rules, it shall be deemed to return all data.
 5. Range: 01-02, considered as 1-2.

Status code:

Return status code in fragments: 206
Non-fragmented status code: 200

Token verification is required for every call.

If Content-Length is not returned in the response Header, it means that the pull file is sent once. In this case, there is only one byte of data in response contents. When the characters returned are as below:

1: Resources not found, report downloading failed (107)

2: The file sizes are not the same, report downloading failed (107)

3: Invalid token, report downloading failed (107)

4: Failed to get file

5: Request parameter error

6: NB base station restrictions (The status code only appears when downloading NB device )

Return Parameter

Return binary file

When there is no Range field in the header, return all data by default. There are three important fields in the response message:

1. Content-Disposition: Filename is included in the field.
2. Content-Range: It indicates the data location currently requested and the total number of resources (len).
3. Content-Length: data size currently requested.

个搜索结果,搜索内容 “

    0 个搜索结果,搜索内容 “