I want to extract a page by javascript (client based language) the problem is the third-part remote url doesnt not allow ajax request when i do this req without the header X-REQUESTED-WITH it gives the expected data with 200 Success in response but when i req it with that header it give 403 Forbidden with no content in respone .
i want to know how to req a page without the header X-REQUESTED-WITH in javascript , ajax , jquery or any client based language .
Please help me .
thanks
The
X-REQUESTED-WITHheader is not “standard”. jQuery for instance will add it manually.So by doing a default XHR request
there will not be this header. In the above simplified example we added a custom
FOOrequest header instead, that is the same thing like jQuery adds theX-REQUESTED-WITHheader into its ajax requests.