Initial exercise setup.
Additions * Instructions for manually starting the database. * Each phase now has a success criteria with how to verify. * Troubleshooting section for working with the Docker DB container. * All phases of the exercise are described in README.md (with as little advanced hints as possible). * DFD to illustrate phase 1 * Debugging starts the database container and applies schema migrations (no setup required). * Launch settings for VS Code, VS 2022 and Rider (IntelliJ IDEA). * Swagger UI is available at <http://localhost:8080/swagger/index.html> for testing.
This commit is contained in:
24
service/JsonPlaceholderClient.cs
Normal file
24
service/JsonPlaceholderClient.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Json;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace service;
|
||||
|
||||
public class JsonPlaceholderClient
|
||||
{
|
||||
private readonly HttpClient _client;
|
||||
|
||||
public JsonPlaceholderClient(HttpClient client)
|
||||
{
|
||||
_client = client;
|
||||
// TODO: Configure the client as needed.
|
||||
}
|
||||
|
||||
public async Task<PostModel?> GetPostByIdAsync(int id, CancellationToken ct = default)
|
||||
{
|
||||
// TODO: Implement the logic to call the external service and retrieve the post by ID.
|
||||
throw new NotImplementedException("This method will be implemented in Phase 1.");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user