Skip to content

Conversation

@yberkholz
Copy link
Contributor

Add feature BeforeRequestCallback

Add public getter/setter for properties

  • ClassPrefix
  • BeforeRequestCallback

Offers the possibility to change the classprefix and modify the XHR request, e.g.:

hinclude.setClassPrefix('hinclude-http-error hinlcude-http-');

hinclude.setBeforeRequestCallback(function(req, url) {
    req.setRequestHeader("X-Requested-With", "XMLHttpRequest");
    req.setRequestHeader("X-Request-Source", "HTMLInclude");
});

Add feature `BeforeRequestCallback`

Add public getter/setter for properties
- ClassPrefix
- BeforeRequestCallback
@mnot
Copy link
Owner

mnot commented Nov 13, 2012

If you rebase and add some tests (see the tests directory), I'll take the pull request. Sorry for the delay -- wanted to get the test infrastructure in place.

@kingcrunch
Copy link

/ping @yberkholz

This would solve #24 too: With this PR everybody could decide themself, if they send this with or without X-Request-With (as mentioned in this comment).

@L0rD59
Copy link

L0rD59 commented Oct 28, 2013

Up ?

Base automatically changed from master to main February 11, 2021 04:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants