the post action seems to have no effect on the .net core controller.
if you put [
turns out, angular uses a particular header name "x-xsrf-token" to store token for the server to accept:
the following client code snippet in the angular 6 component works. it's just part of . only to note the headers line.
const event: uploadinput = { type: 'uploadall', url: this.upload_api_url + '?guid=' + this.guid, method: 'post', headers: {'x-xsrf-token': this._cookieservice.get("xsrf-token")}, withcredentials: true, data: { foo: 'bar' } };
_cookieservice is an injected service using . you may use any cookie tool.
您可能感兴趣的文章:
如您对本文有疑问或者有任何想说的,请 点击进行留言回复,万千网友为您解惑!
网友评论