Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the name of IHttpClientContext more concrete #22

Open
evgenyvalavin opened this issue Oct 19, 2022 · 7 comments
Open

Make the name of IHttpClientContext more concrete #22

evgenyvalavin opened this issue Oct 19, 2022 · 7 comments
Labels
enhancement New feature or request

Comments

@evgenyvalavin
Copy link
Contributor

What is the purpose of IHttpClientContext? Hard to say...
The main idea of IHttpClientContext was to think of this as a server. Why would not to rename IHttpClientContext to IServer then? It'll dramatically increases the idea and understanding of the concept.

@evgenyvalavin
Copy link
Contributor Author

@Maxerdan any thoughts on this?

@evgenyvalavin evgenyvalavin added the enhancement New feature or request label Oct 19, 2022
@Maxerdan
Copy link
Contributor

It's unnecessary and confusing.
If we open IHttpClientContext we see RunEnpoint wich would mean "Start listening endpoint..." in IServer context

@evgenyvalavin
Copy link
Contributor Author

@Maxerdan I wouldn't say renaming IHttpClientContext is unnecessary. IHttpClientContext does require renaming.
We need to think about other options then.
IRemoteServer?
What if RunEndpoint() needs renaming to not confuse with "Start listening endpoint"?

@Maxerdan
Copy link
Contributor

I don't understand why "Server" should be part of the name.
IHttpClientContext needs to send the request not recieve it.
Server associated with running machine or service wich task is to handle the requests and send the response.
IHttpClientContext do the client functions in "Client-Server" relations.
I think IHttpClientContext name is correct. For example, lets look into Apache, "Adaptor class that provides convenience type safe setters and getters for common HttpContext attributes used in the course of HTTP request execution."
Mb name should be IClientNetwork?

@evgenyvalavin
Copy link
Contributor Author

ASP.NET has HttpContext class the purpose of which is different

@evgenyvalavin evgenyvalavin changed the title Rename IHttpClientContext to IServer Make the name of IHttpClientContext more concrete Oct 21, 2022
@Leo506
Copy link
Contributor

Leo506 commented Jun 8, 2023

How about

  • IRestClient (or IRestService)
  • IApiClient (or IApiService)

So in our projects we will have classes like WaiterApiClient, PrimeHillApiClient, Card5ApiClient, ExternalLoyaltyApiClient.

@evgenyvalavin
Copy link
Contributor Author

evgenyvalavin commented Jul 5, 2024

There's something interesting with an ApiClient naming because that's what it is: an API server and an API client.

Some info from the Internet:
What is an API Client?

  1. An API client is a set of tools and protocols that operate from an application on a computer.
  2. API Client API Client means the software that acts as the interface between Customer's computer and the server)means the software that acts as the interface between Customer's computer and the server.
  3. An API client is a development tool that makes it easier for producers and consumers to explore, test, and debug APIs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants