Type Safely

Type Safely

Share this post

Type Safely
Type Safely
Mock Server Responses Using Combine and Display a Dog Photo For Any HTTP Status Code
Copy link
Facebook
Email
Notes
More

Mock Server Responses Using Combine and Display a Dog Photo For Any HTTP Status Code

Daily Coding Tip 245

Type Safely's avatar
Type Safely
Feb 09, 2023
∙ Paid

Share this post

Type Safely
Type Safely
Mock Server Responses Using Combine and Display a Dog Photo For Any HTTP Status Code
Copy link
Facebook
Email
Notes
More
Share
white and brown long coat large dog
Photo by Pauline Loroy on Unsplash

There is a service called http.dog that will provide a picture of a dog that describes any valid HTTP status code.

An obvious example of this is a 404 error, where an image of a dog digging a whole is returned. In order to demonstrate this I wanted to display the correct dog based on the server response. 

But how do I co…

Keep reading with a 7-day free trial

Subscribe to Type Safely to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Type Safely
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share

Copy link
Facebook
Email
Notes
More