$http POST preflight error with CORS

Preflighted error while using the $http.post() method. The $http service  uses the browsers XMLHttpRequest object.  Angular defaults the $http.post method to use content type of ‘application/json. Based on this documentation this default content type would trigger a preflighted request while using CORS.

User Signup and Login with Firebase for IOS

With Parse being killed off by facebook I wanted to give Firebase a shot. Here is a simple Signup and Login example using Swift in iOS.

First, you want to go ahead and create an account. They offer a free development account, this should be enough to get you going.

This article is a big help in getting Firebase integrated into your Xcode project. https://www.firebase.com/docs/ios/quickstart.html

Below is commented code of the example.

Here is a screenshot of a newly added user in the Firebase dashboard.

Screen Shot 2016-02-04 at 2.33.13 PM

 

 

Using $http and $q in an Angular Service

JS Bin on jsbin.com

© 2016 Aldo Lugo

Theme by Anders NorenUp ↑