Send post request from different domain

82 views
Skip to first unread message

Ashutosh Das

unread,
Jan 11, 2014, 9:22:51 AM1/11/14
to ang...@googlegroups.com
How to send data using  $http.post from different domain . By default it throws "Access-Control-Allow-Origin" .

Jeff Hubbard

unread,
Jan 11, 2014, 2:21:34 PM1/11/14
to ang...@googlegroups.com
You have two choices: one, support Cross-Origin Resource Sharing; two, use JSONP. What, specifically, you need to post and how you need it returned will dictate which method you use.

Ashutosh Das

unread,
Jan 11, 2014, 10:13:43 PM1/11/14
to ang...@googlegroups.com
So how do I enable Cross-Origin Resource Sharing from angularjs side ? For backend I m using Laravel .


--
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/0XTElO2pxIc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.

TigerNassau

unread,
Jan 12, 2014, 9:21:57 AM1/12/14
to ang...@googlegroups.com
You do it on the server side as middleware. Search for CORS examples for Laravel or PHP

Sent from my LG Mobile

Ashutosh Das <areo...@gmail.com> wrote:

>You received this message because you are subscribed to the Google Groups "AngularJS" group.
>To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.

jus...@silvermoongroup.com

unread,
Jan 13, 2014, 1:49:51 AM1/13/14
to ang...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages