Hi All! :) I'm calling a Rest API from AngularJS, and I can't add a Request Header. I'm trying the Rest API with Postman, and when I add "apikey" in Headers, it works great!
<https://lh3.googleusercontent.com/-7X63p2NU-4M/V4z2te6zbvI/AAAAAAAChuA/AQjkkf2zzeYaFSIEk5rqCKeHQsHJQdIEQCLcB/s1600/Captura%2Bde%2Bpantalla%2B2016-07-18%2Ba%2Blas%2B17.05.31.png> I installed ModHeader extension to Chrome, then my call works. Is there a way to add the "apikey" in the Request Headers? I was trying different methods with out success: var headers = new Headers(); headers.append('apikey', myApikey); $http.defaults.headers.post["apikey"] = myApikey; $http.post('http://localhost:8000/app_dev.php/api/admin/users/user', Object.toparams(datos), { headers: headers } ) Any idea? Thanks, Rafa -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
