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 651619
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:10:55+00:00 2026-05-13T22:10:55+00:00

Basically what the title says, I want to get the URL and HTTP Verb

  • 0

Basically what the title says, I want to get the URL and HTTP Verb from a xhr. Is this possible?

  • 1 1 Answer
  • 1 View
  • 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-05-13T22:10:56+00:00Added an answer on May 13, 2026 at 10:10 pm

    Not natively, I’m afraid. In prototypable implementations you could write your own prototype:

    XMLHttpRequest.prototype.__oldOpen = XMLHttpRequest.prototype.open;
    XMLHttpRequest.prototype.verb = "";
    XMLHttpRequest.prototype.url  = "";
    XMLHttpRequest.prototype.open = function (verb, url, async)
    {
        this.verb = verb;
        this.url  = url;
        this.__oldOpen.call(this, verb, url, async); 
    }
    

    Don’t expect it to work in IE7 and older though.


    I suppose you could do it by completely recreating the XMLHttpRequest object, but it would take a lot of work to get it right:

    var oldXHR = XMLHttpRequest;
    function XMLHttpRequest()
    {
        var realXHR = new oldXHR();
        this.onreadystatechange = function () {}
        this.open = function (verb, url, async)
        {
            this.verb = verb;
            this.url  = url;
            realXHR.open(verb, url, async);
        {
        this.send = function () { realXHR.send(); }
    
        // all other properties and methods... 
    }
    

    Of course, you have to go to the effort of correctly binding onreadystatechange and setting the status, etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The title basically says it all. I mainly want to do this so that
Title basically says it all. The error I get at: document.forms[0].onsubmit = validateForm; This
The title already says a lot, but basically what i want to do is
Title basically says it all. This is my script: keepProgramRunning = True a =
Like the title says, my code basically does this: set proxy, test proxy, do
The question title basically says it all. Is it possible in JPA/Hibernate to gracefully
So basically what I want to do as the title says is when I
Well - the title basically says it. I want to look at the URLs
The title pretty much says it all. Basically, is it legal to do this:
Basically its what the title says. This is my code. USE Assignment2; GO /*

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.