Skip to main content

Headers

Retrieve the headers your application is sending for troubleshooting authentication issues.

Making Requests

Use the headers() method on the utilities resource to see request headers:

headers

public function headers(): Headers

Retrieve the headers sent by your application. This endpoint aids in troubleshooting authentication issues, particularly with the Authorization header.

Notes

  • Sensitive header values (like Authorization) are partially redacted for security.
  • This is useful for debugging API authentication problems.

Returns

  • Headers

    A Headers response object containing the headers sent in the request.

<?php

use MarketDataApp\Client;

$client = new Client();

// Get the headers being sent
$headers = $client->utilities->headers();

echo "Request Headers:\n";
echo "================\n";

foreach ($headers->headers as $name => $value) {
echo "$name: $value\n";
}

Output

Request Headers:
================
Authorization: Bearer eyJ0...***REDACTED***
Content-Type: application/json
User-Agent: MarketDataApp-PHP/1.0.0
Host: api.marketdata.app

Headers

class Headers extends ResponseBase
{
public string $status;
public array $headers;
}

Represents the request headers sent to the API.

Properties

  • status (string): Response status ("ok").
  • headers (array): Associative array of header name => value pairs.