I`m trying to access a URL with Basic Authentication.
The URL returns JSON data.
How can I add my username and password to this http request below?
private postsURL = "https://jsonExample/posts";
getPosts(): Observable<AObjects []>{
return this.http.get<AObjects[]>(this.postsURL);
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…