206

Partial Content

2xx Success The server is delivering only part of the resource due to a range header

Code Examples

Here are examples of how to test HTTP 206 responses in different programming languages:

Select options below to see how to use advanced features in your code:

Request:
curl https://free.mockerapi.com/206
Response Body:
{
  "success": true,
  "status": 206,
  "statusText": "Partial Content - The server is delivering only part of the resource due to a range header",
  "timestamp": "2025-10-08T10:30:45.123Z",
  "request": {
    "method": "GET",
    "url": "/206",
    "fullUrl": "https://free.mockerapi.com/206"
  }
}
Request:
fetch('https://free.mockerapi.com/206')
  .then(response => {
    console.log('Status:', response.status); // 206
    return response.json();
  })
  .then(data => {
    console.log('Success:', data);
  })
  .catch(error => {
    console.error('Error:', error);
  });
Response Body:
{
  "success": true,
  "status": 206,
  "statusText": "Partial Content - The server is delivering only part of the resource due to a range header",
  "timestamp": "2025-10-08T10:30:45.123Z",
  "request": {
    "method": "GET",
    "url": "/206",
    "fullUrl": "https://free.mockerapi.com/206"
  }
}
Request:
import requests

response = requests.get('https://free.mockerapi.com/206')

print(f'Status Code: {response.status_code}')  # 206
print(f'Response: {response.json()}')
Response Body:
{
  "success": true,
  "status": 206,
  "statusText": "Partial Content - The server is delivering only part of the resource due to a range header",
  "timestamp": "2025-10-08T10:30:45.123Z",
  "request": {
    "method": "GET",
    "url": "/206",
    "fullUrl": "https://free.mockerapi.com/206"
  }
}
Request:
Response Body:
{
  "success": true,
  "status": 206,
  "statusText": "Partial Content - The server is delivering only part of the resource due to a range header",
  "timestamp": "2025-10-08T10:30:45.123Z",
  "request": {
    "method": "GET",
    "url": "/206",
    "fullUrl": "https://free.mockerapi.com/206"
  }
}
Request:
require 'net/http'
require 'json'

uri = URI('https://free.mockerapi.com/206')
response = Net::HTTP.get_response(uri)

puts "Status Code: #{response.code}"  # 206
puts "Response: #{JSON.parse(response.body)}"
Response Body:
{
  "success": true,
  "status": 206,
  "statusText": "Partial Content - The server is delivering only part of the resource due to a range header",
  "timestamp": "2025-10-08T10:30:45.123Z",
  "request": {
    "method": "GET",
    "url": "/206",
    "fullUrl": "https://free.mockerapi.com/206"
  }
}
Request:
package main

import (
    "fmt"
    "io"
    "net/http"
)

func main() {
    resp, err := http.Get("https://free.mockerapi.com/206")
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()

    fmt.Printf("Status Code: %d\n", resp.StatusCode)  // 206

    body, err := io.ReadAll(resp.Body)
    if err != nil {
        panic(err)
    }

    fmt.Printf("Response: %s\n", body)
}
Response Body:
{
  "success": true,
  "status": 206,
  "statusText": "Partial Content - The server is delivering only part of the resource due to a range header",
  "timestamp": "2025-10-08T10:30:45.123Z",
  "request": {
    "method": "GET",
    "url": "/206",
    "fullUrl": "https://free.mockerapi.com/206"
  }
}
Request:
import java.net.http.*;
import java.net.URI;

public class HttpStatusTest {
    public static void main(String[] args) throws Exception {
        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://free.mockerapi.com/206"))
            .GET()
            .build();

        HttpResponse response = client.send(request,
            HttpResponse.BodyHandlers.ofString());

        System.out.println("Status Code: " + response.statusCode());  // 206
        System.out.println("Response: " + response.body());
    }
}
Response Body:
{
  "success": true,
  "status": 206,
  "statusText": "Partial Content - The server is delivering only part of the resource due to a range header",
  "timestamp": "2025-10-08T10:30:45.123Z",
  "request": {
    "method": "GET",
    "url": "/206",
    "fullUrl": "https://free.mockerapi.com/206"
  }
}
Request:
const https = require('https');

https.get('https://free.mockerapi.com/206', (res) => {
  console.log('Status Code:', res.statusCode);  // 206

  let data = '';

  res.on('data', (chunk) => {
    data += chunk;
  });

  res.on('end', () => {
    console.log('Response:', JSON.parse(data));
  });
}).on('error', (err) => {
  console.error('Error:', err.message);
});
Response Body:
{
  "success": true,
  "status": 206,
  "statusText": "Partial Content - The server is delivering only part of the resource due to a range header",
  "timestamp": "2025-10-08T10:30:45.123Z",
  "request": {
    "method": "GET",
    "url": "/206",
    "fullUrl": "https://free.mockerapi.com/206"
  }
}

What is HTTP 206 Partial Content?

HTTP 206 Partial Content indicates that the server is delivering only part of the resource due to a range request sent by the client. This is commonly used for resumable downloads and streaming media.

  • Range Requests: Client requested a specific byte range
  • Resumable Downloads: Enables download resume functionality
  • Media Streaming: Used for video and audio streaming
  • Content-Range Header: Response includes Content-Range header

When Does This Happen?

A 206 Partial Content response is returned when the server delivers part of a resource based on a Range header in the request. You'll see this status code when:

  • Resuming interrupted file downloads
  • Streaming video or audio content
  • Downloading large files in chunks
  • Implementing progressive loading for media
  • Seeking to specific positions in media files

Try It Live

Click the button below to make a live request and see the 206 Partial Content response

Common Use Cases

📥 Resumable Downloads

Test download resume functionality for large files.

🎬 Media Streaming

Mock video and audio streaming with partial content responses.

📊 Progress Indicators

Develop progress bars and loading indicators for chunked transfers.

⏯️ Seek Functionality

Test media player seek and skip functionality.

📦 Chunk Processing

Handle large file transfers broken into manageable chunks.

🔄 Range Request Logic

Implement and test Range header handling in your application.

Related Success Status Codes