how to pass header in ajax api code example Example: pass header in ajax $.ajax({ url: "/test", headers: {"X-Test-Header": "test-value"} });