U
U
UntitledNikname2020-11-07 12:27:00
symfony
UntitledNikname, 2020-11-07 12:27:00

How to work with third party api?

I use symfony, and when writing another connection to the X service api, the question arose whether I was doing it right. Are there any rules for organizing an application working through the api side? Now I am writing requests to the api in the controller..

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Korotenko, 2020-11-07
@UntitledNikname

Make a service. In it, refer to this api or to your stub for the duration of testing. In the same place you can transform the data if they are clumsy. Error handling can be both taken out above and extinguished in place by sending a message to the logs and an empty object to call

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question