Skip to content

Instantly share code, notes, and snippets.

View GooRiOn's full-sized avatar
🤘
Code 'em all

Dariusz Pawlukiewicz GooRiOn

🤘
Code 'em all
View GitHub Profile
@GooRiOn
GooRiOn / setup.md
Last active September 8, 2024 22:29
Git For Win + Windows Terminal Setup

Synchronous communication between services pt.1

Change the implementation of command handler SendStoryHandler inside stories-service so it now fetches the user from users-service. Make the usage of IHttpClient from Convey package. The following steps will guide you through the process:

  1. Register HTTP client using AddHttpClient() method in Extensions.cs (infrastructure-layer)
  2. Change the implementation of UsersApiHttpClient so it now uses IHttpClient injected into the ctor. Either hardcode the URL or make usage of HttpClientOptions.
  3. Change implementation of command handler so it now uses the API Client.
  4. Test the flow! Remember to have users-service ruuning.