angular


AngularJS 4 Cross Domain POST menthod not working


Cross-domain GET method working fine but for POST method its showing error - Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost/icapi/v1/core/appointments/upcomming. (Reason: missing token ‘access-control-allow-credentials’ in CORS header ‘Access-Control-Allow-Headers’ from CORS preflight channel).
let headers = new Headers({
'Origin': '*',
'Content-Type': 'multipart/form-data',
'Access-Control-Allow-Origin': '*',
'Access-Control-Request-Method' : '"POST", "GET"',
'Access-Control-Request-Headers' :'origin, X-Auth-Token,Content-Type, accept',
'Access-Control-Allow-Credentials' : true
});
let options = new RequestOptions({ headers: headers });
return this.http.post("/core/appointments/upcomming", JSON.stringify({ userId: userId, userType: userType }),options).map((response:Response) => response.json());

Related Links

How to display json object parameters in angular 2 template typescript
ZoneAwareError when running agular2 application in safari
I want to bind the legend option with checkbox(show legend or not)
How to get value from asynchronous local storage function and pass it to modal ionic 2
Syntax highlighting in Angular 2
angular2-cli cannot load style error
Angular2/Rxjs: 'catch' on observable giving ProgressEvent instead of json from response
Display items depending on date issued
Opening menu using position, angular2 material
Undefined is not an object(evaluating) - angular
Font Awesome with Ionic2
angular view is not updating after component value gets changed
how do I merge the values of the child components of angular2 into reactive form object?
Angular2 multiple components different imports
Update an array with new objects
Dropbox service with popup

Categories

HOME
hyper-v
java-ee
.net-core
logistic-regression
post
filesystems
linuxmint
terraform
autofixture
directive
interaction
photon
conv-neural-network
smt
fgets
file-permissions
osx-elcapitan
react-apollo
entity-relationship
u2
git-clone
android-sensors
protobuf-c
android-ffmpeg
induction
required
artoolkit
submenu
asn.1
gunicorn
oracle-data-modeler
data-compression
sap-bw
smartassembly
trace
cakephp-2.x
canvas-lms
lpc
matlab-guide
proof-of-correctness
bubble-sort
simplehttpserver
satellite
use-case
date-formatting
google-chrome-arc
aide-ide
mockery
orchardcms-1.9
mongoose-web-server
octopress
javascript-globalize
realbasic
nameerror
objdump
undefined-symbol
bullseye
steroids
tstringgrid
beta-testing
window-position
nstablecolumn
fswatch
mpmediapickercontroller
streaminsight
elasticsearch-marvel
tap
certificatestore
er-diagrams
review
spool
stacked-area-chart
editplus
tankauth
nools
texmacs
django-1.2
maskedinput
mdbtools
aspnet-regiis.exe
capability
gwt-2.5
mysql-error-1052
keymando
python-sockets
mobile-phones
sqa
tunneling
set-include-path
entityreference
language-theory
live-cd
comdlg32
trackback
platform-independence
remote-administration

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile