Call Us Now!
Velachery: +91 9884412301 | OMR: +91 9600112302
info@credosystemz.com
AngularJS Training in ChennaiAngularJS Training in Chennai
  • Home
  • Course Content
  • Realtime Projects
  • Interview Q&A
  • Contact Us
  • Home
  • Course Content
  • Realtime Projects
  • Interview Q&A
  • Contact Us

Blog

  • Home
  • Blog
  • $http Request in Angularjs

$http Request in Angularjs

  • Posted by admin
  • Categories Blog
  • Date March 20, 2019
  • Comments 0 comment

In out previous Article we discussed about Routing in AngularJS. Here we go about importance of $http service in Angularjs. To know more about the complete Services and Directives in AngularJS, Please visit AngularJS Training in Chennai.

 $http is a core AngularJS service which is used to create communication with remote http servers via Browser’s inbuilt object XMLHttpRequest.

 

Syntax:

$http.get(‘/someUrl’, config).then(successCallback, errorCallback);

$http.post(‘/someUrl’, data, config).then(successCallback, errorCallback);

$http.put(‘/someUrl’, data, config).then(successCallback, errorCallback);

$http.delete(‘/someUrl’, config).then(successCallback, errorCallback);

Explanation:

Here the get and post are the method of passing data to the url.  There are few more methods are available as follows.

 

  1. get method is used for send small amount of data and we can send data parameter via params
  2. post method is used for send large amount of data and we can send form data via parameter and also data as a object.
  3. put method is used for update data and we can send form data via parameter and also data as a object.
  4. delete method is used for delte data and we can send data parameter via params

In the above Example the data represents form data and config represents configuration of request in object format.

The $http service returns a promising object which is it will return a object through Success Callback or Error Callback.

 Let’s assume the promising object return a object called response, then we can get the bellow properties.

response.data – it returns a string or object. It should be the result or outcome of the url which we sent via $http service. In other words, it will be your outcome of business logic which you created in the url.

response.status – {number} – HTTP status code of the response.

response.headers – it returns an object which contain header information.

response.config – it returns an object which contains complete configuration of the request.

response.statusText – {string} – HTTP status text of the response.

  • Share:
admin

Previous post

Top 8 Reasons to Choose AngularJS for Web Applications
March 20, 2019

Next post

Routing in AngularJS
March 20, 2019

You may also like

AngularJS Introduction
20 March, 2019

Here is the Introduction of the Powerful and Super heroic Framework – AngularJS. You can find the following details here. Introduction of Angularjs. Why AngularJS ? Features of AngularJS. Reason to Learn AngularJS. Disadvantages of AngularJS. To know about the …

5 Main pillars of AngularJS
20 March, 2019

Here is the 5 Main pillars of AngulaJS. These are very important components to develop a powerful and Rich web applications in AngularJS. Lets Take a glance about the 5 Pillars of AngularJS. Directives Controllers Scopes Services Dependency Injection Please …

Top 10 Directives in AngularJS
20 March, 2019

Directives are the normal HTML Syntax. AngularJS allows you to extend existing HTML syntax with new attributes called as Directives. AngularJS comes with set of inbuilt Directives and all the Directives has individual behaviors. All the Directives are starts with …

Leave A Reply Cancel reply

Your email address will not be published. Required fields are marked *

Customer reviews across the Internet

CREDO SYSTEMZ5 Star Rating: Recommended - Best IT Training in Chennai
5 out of 5 based on 16224 reviews

Sulekha        5 Star Rating: Recommended - Best IT Training in Chennai

Yet5               5 Star Rating: Recommended - Best IT Training in Chennai

Facebook      5 Star Rating: Recommended - Best IT Training in Chennai

Google+        5 Star Rating: Recommended - Best IT Training in Chennai

Justdial         5 Star Rating: Recommended - Best IT Training in Chennai

Thinkvidya   5 Star Rating: Recommended - Best IT Training in Chennai

CREDO SYSTEMZ – VELACHERY

New # 30, Old # 16A, Third Main Road,
Rajalakshmi Nagar, Velachery,
(Opp. to Murugan Kalyana Mandapam),
Chennai - 600 042.
Mobile: +91 9884412301
Email: info@credosystemz.com
Web: www.credosystemz.com

CREDO SYSTEMZ – OMR

Plot No.8, Vinayaga Avenue,
Rajiv Gandhi Salai, (OMR),
Okkiampettai,
Landmark - Okkiyampet Bus Stop,
Next to Buhari Hotel,
Chennai – 600 097.
Mobile: +91 9600112302

TRENDING COURSES

  • Python Training in Chennai
  • Data Science Training in Chennai
  • AWS Training in Chennai
  • Big Data Hadoop Training in Chennai
  • Machine Learning Training in Chennai
  • Angular Training in Chennai
  • Mean Stack Training in Chennai
  • RPA Training in Chennai
  • DevOps Training in Chennai
  • R Programming Training in Chennai
  • Microsoft Azure Training

Copyright 2022 Angularjstraininginchennai.in | All Rights Reserved