ng-docs.github.io icon indicating copy to clipboard operation
ng-docs.github.io copied to clipboard

使用angualr7可以发送https的请求吗,看到只有HttpHeaders,没有Https相关的内容

Open houxingx opened this issue 6 years ago • 3 comments

houxingx avatar Apr 01 '19 11:04 houxingx

在 angular 里面,发送 https 和 http 一样

tc9011 avatar Apr 01 '19 11:04 tc9011

在 angular 里面,发送 https 和 http 一样

请求头只提供了 import { HttpClient, HttpHeaders } from '@angular/common/http'; 如果我需要切换为https,对应的请求头要怎么改。https使用http的请求头会报"no-referrer-when-downgrade"

houxingx avatar Apr 02 '19 01:04 houxingx

........这个.....怎么说呢 用http或者https不是前端决定的,而是后端决定的 当你请求时如果非跨域,不加http/https就ok 跨域时要看请求的后端接受什么了,其他与httpclient没任何关系,不需要一个httpsclient......

wszgrcy avatar Apr 02 '19 14:04 wszgrcy