# Advanced API Topics

Now that we have learned the basics of creating a RESTful Web API we will discuss advanced some API programming techniques.

Updated: November 16, 2026

## [Dissecting the Request and Response](https://www.ask-codey.com/courses/java-full-stack-bootcamp/topics/dissecting-the-request-and-response)

1. [The Request / Response Pattern](https://www.ask-codey.com/lessons/dissecting-the-request-and-response-the-request-response-pattern) (Journeyman): A web request and its response are simple text messages, each made of a header and an optional body.
2. [Using a Simple HTTP Client](https://www.ask-codey.com/lessons/dissecting-the-request-and-response-using-a-simple-http-client) (Journeyman): Test an API without leaving your editor by writing requests in a .http file and running them from IntelliJ or VS Code.

## [Returning HTTP Status Codes](https://www.ask-codey.com/courses/java-full-stack-bootcamp/topics/returning-http-status-codes)

1. [Returning HTTP Status Codes: an overview](https://www.ask-codey.com/lessons/returning-http-status-codes-an-overview) (Apprentice): Why the default status codes (200 on success, 500 on any error) aren't enough, shown by a request for a category that doesn't exist and still gets 200.
2. [Common HTTP Status Codes](https://www.ask-codey.com/lessons/returning-http-status-codes-common-http-status-codes) (Apprentice): The status codes a REST API uses most, 200, 201, 204, 400, 401, 403, 404 and 500, and what each tells the client.
3. [Returning ResponseEntity&lt;T>](https://www.ask-codey.com/lessons/returning-http-status-codes-returning-responseentity-t) (Journeyman): Return a ResponseEntity from a controller method to choose the status code, for example 404 when a category isn't found and 500 when something fails.

## [Handling Global Exceptions](https://www.ask-codey.com/courses/java-full-stack-bootcamp/topics/handling-global-exceptions)

1. [Handling Global Exceptions](https://www.ask-codey.com/lessons/handling-global-exceptions) (Freelancer): Use a @RestControllerAdvice class with an @ExceptionHandler to send every error back in one format, 404 for a path that doesn't exist and 500 for anything else.

Source: https://www.ask-codey.com/courses/java-full-stack-bootcamp/chapters/advanced-api-topics
