25 lines
647 B
C#
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.");
|
|
}
|
|
}
|