All fields

“HTTP Client & Interceptors” in Information Technology

19 questions across 1 technology.

Information Technology

19 questions in 1 technology

#QuestionTechnologyTopicLevel
1How do you make a basic GET request to a server using Angular's HttpClient? Angular › HTTP Client & InterceptorsAngularHTTP Client & InterceptorsBeginner
2How do you send data to a server using a POST request with Angular's HttpClient? Angular › HTTP Client & InterceptorsAngularHTTP Client & InterceptorsBeginner
3What is an HTTP interceptor in Angular, and what is it commonly used for? Angular › HTTP Client & InterceptorsAngularHTTP Client & InterceptorsIntermediate
4How would you handle errors from an HTTP request in Angular, showing a friendly message to the user? Angular › HTTP Client & InterceptorsAngularHTTP Client & InterceptorsIntermediate
5How would you use an interceptor to automatically retry a failed HTTP request a few times before giving up? Angular › HTTP Client & InterceptorsAngularHTTP Client & InterceptorsAdvanced
6How would you test an Angular service that makes HTTP requests, without making real network calls during the test? Angular › Testing with Jasmine & KarmaAngularTesting with Jasmine & KarmaAdvanced
7Why should you avoid storing sensitive information, like an authentication token, directly in an Angular app's local storage? Angular › Angular Security (XSS, Sanitization & CSP)AngularAngular Security (XSS, Sanitization & CSP)Beginner
8What is an observable in RxJS, and how is it different from a promise? Angular › RxJS & ObservablesAngularRxJS & ObservablesBeginner
9What is a Content Security Policy, often shortened to CSP, and how does it add another layer of protection to an Angular app? Angular › Angular Security (XSS, Sanitization & CSP)AngularAngular Security (XSS, Sanitization & CSP)Intermediate
10How do environment files work in Angular, and how do you use different values for development and production? Angular › Build, Environments & DeploymentAngularBuild, Environments & DeploymentIntermediate
11How would you set up Cypress in an Angular project to write your first end to end test? Angular › End to End Testing with Cypress & PlaywrightAngularEnd to End Testing with Cypress & PlaywrightIntermediate
12What is a resolver in Angular routing, and what problem does it solve? Angular › Router Guards & ResolversAngularRouter Guards & ResolversIntermediate
13What do the map, filter, and switchMap RxJS operators do, and when would you use each? Angular › RxJS & ObservablesAngularRxJS & ObservablesIntermediate
14How do you fetch data on the server before rendering a page with Angular Universal? Angular › Server-Side Rendering with Angular UniversalAngularServer-Side Rendering with Angular UniversalIntermediate
15How would you define a strongly typed interface for data returned from an API, and use it throughout an Angular service? Angular › TypeScript with AngularAngularTypeScript with AngularIntermediate
16How would you safely display user generated HTML content, such as a rich text comment, without exposing your app to XSS attacks? Angular › Angular Security (XSS, Sanitization & CSP)AngularAngular Security (XSS, Sanitization & CSP)Advanced
17How would you mock a backend API response during an end to end test to avoid depending on a real server? Angular › End to End Testing with Cypress & PlaywrightAngularEnd to End Testing with Cypress & PlaywrightAdvanced
18How would you create a custom asynchronous validator that checks something against a server, such as whether a username is already taken? Angular › FormsAngularFormsAdvanced
19How do NgRx Effects let you handle asynchronous operations, like an API call, in response to a dispatched action? Angular › NgRx State ManagementAngularNgRx State ManagementAdvanced