Skip to content

Allow passing custom headers to NetBox #219

@newlandk

Description

@newlandk

I run a NetBox instance behind a proxy service that assists with logging and tracking of requests beyond what NetBox provides natively. It would be useful if we could append custom headers to the request to support injection of custom values as needed.

e.g.

import pynetbox
nb = pynetbox.api(
    'http://localhost:8000',
    token='d6f4e314a5b5fefd164995169f28ae32d987704f',
    custom_headers={'Tracking-Header': 'tracking_header_value'}
)

sample request header

headers = {
    "Content-Type": "application/json;",
    "Tracking-Header": "tracking_header_value"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions