Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8914675
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:47:07+00:00 2026-06-15T04:47:07+00:00

How do I set headers before letting breeze make a request? Example: my service

  • 0

How do I set headers before letting breeze make a request?

Example: my service expects a certain key to be part of the request in
a header name ‘x-service-key’. Till now, I was using jquery ajax and
amplify, so pretty easy to set up the header. Since I don’t have any
control over the request that breeze is making, how do I pass extra
stuff like headers?

This question was posted by sujesharukil on our IdeaBlade forums. I am reposting the question and answer here since I think it will be useful to the Breeze Stack Overflow community.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T04:47:08+00:00Added an answer on June 15, 2026 at 4:47 am

    As of Breeze 0.70.1 we now support for the ability to completely customize or replace any Ajax communication between the breeze client and the web service on the server.

    The Breeze documentation on our Ajax support is still in progress, but hopefully the following will get you started.

    To control the headers on every Ajax request that Breeze makes, you can execute the following code when your app first starts up.

     var ajaxImpl = breeze.config.getAdapterInstance("ajax");
     ajaxImpl.defaultSettings = {
           headers: { 
               // any CORS or other headers that you want to specify.
               "X-Test-Header": "foo2" 
           },
    };
    

    Alternatively, you can intercept the individual Ajax calls and add your headers selectively based on the request.

     var ajaxImpl = breeze.config.getAdapterInstance("ajax");
     ajaxImpl.defaultSettings = {
           beforeSend: function(jqXHR, settings) {
                  // examine the jqXHR or settings and customize the headers accordingly.
                  jqXHR.setRequestHeader("X-Test-Before-Send-Header", "foo2");
           }
     };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to set headers like post variable name and the value and send
How do I set custom HTTP headers on an ESB proxy service Out Sequence?
When serving a request, GAE automatically inserts response header X-AppEngine-Country set to a value
Is there a particular order in PHP to set HTTP headers with the header()
Is there a way, at the web server level (web.xml) to set headers for
this is really doing my nut..... all relevant PHP Output scripts set headers (in
I have set cache headers to be far in future (1 year from now)
At the moment we set content-type in our responce headers, a bit like this...
I am trying to set a cookie in my Google App Engine page: self.response.headers.add_header('Set-Cookie','CookieName=1234;
I'm trying to set the HttpRequestHeader for a HttpWebRequest like so: new HttpWebRequest().Headers.Add(HttpRequestHeader.UserAgent, Mozilla/4.0);

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.