我正在尝试使用基本身份验证访问URL 。
URL返回JSON数据。
如何在下面的http请求中添加用户名和密码?
private postsURL = "https://jsonExample/posts"; getPosts(): Observable<AObjects []>{ return this.http.get<AObjects[]>(this.postsURL); }
javascript rest json typescript angular
angular ×1
javascript ×1
json ×1
rest ×1
typescript ×1