R
R
Roman Khegay2020-08-18 14:10:45
API
Roman Khegay, 2020-08-18 14:10:45

What is the difference between the method name: get, fetch, load?

What is the correct way to call methods when working with an external API?

Let's take an example:
There is a server running on PHP.

There is a client application running on Angular.

The application makes a request to the server to get an array of users through a separate file called users.service.ts. Next, there is a component that displays a list of users.

The method inside user.service.ts is called fetchUserList(), and the component has a method getUserList(), inside the method there is a service call via userService.fetchUserList().

Are the method names correct?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
d-stream, 2020-08-18
@d-stream

I would logically take something like this (taking into account a slightly different area)):
get - get something small
load - load something big
fetch - get [another]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question