.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Articles >> Javascript >> Post New Resource Bookmark and Share   

 Subscribe to Articles

Http through Javascript

Posted By:nishithraj       Posted Date: November 27, 2009    Points: 25    Category: Javascript    URL: http://www.dotnetspark.com  
 

Http through Javascript.


Many scenarios we may require to access the HttpRequest from clientside. This codesnippet will help you in that time.

You can get the Http using following codes

var objHttp = this.prototype;


To mention the HttpRequest by following line
objHttp.defineProperty("requestMethod", "GET");


To get the reponse text use the following code.
objHttp.defineProperty("responseText", this._http.responseText);


get the username and password as follows

objHttp.defineProperty("username", null);
objHttp.defineProperty("password", null);


You can even set the request header through javascript
objHttp.setRequestHeader("Content-Type", "application/-----");


 Subscribe to Articles

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend