2
0
Files
dotnet-interview-exercise/service/JsonPlaceholderClient.cs
Simon Dellenbach c3c8c85afe Some small improvements for clarity.
* PostModel -> PostDto
* 404 test case
* README
2026-02-18 10:41:52 +01:00

25 lines
647 B
C#

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<PostDto?> 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.");
}
}