Do We Need to Unsubscribe Angular HttpClient?

Is there any way we can unsubscribe Angular HttpClient manually? Fortunately, yes we have! But we don’t need to unsubscribe it. Instead, HttpClient observes until getting a response from API. And, once it gets the response, HttpClient unsubscribes automatically. Https use AsyncPipe for the response and the AsyncPipe subscribes to an Observable. It returns the […]


Adding a Mime Type to WordPress

WordPress doesn’t have .xml as part of its default mime-types, so we need to add it ourselves. How can you do that? Search for wp_get_mime_types() function in the WordPress core files. You will find it inside the wp-includes/function.php. In the function, you will find a filter called mime_types. We have an appropriate filter now, and […]