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