How to Call a REST API using WebClient in Spring Boot

preview_player
Показать описание
Spring is a very powerful tool, but some of the functionality is a bit confusing at first. I want to showcase how to make a simple get-call to retrieve data from an API, which can then be expanded to do more complex things.

NOTE Angled brackets are not allowed in youtube descriptions
(Angled brackets replaced with ")
Dependency:

"dependency"
"artifactId" spring-boot-starter-webflux "/artifactId"
"/dependency"

My channel publishes programming and software engineering videos, especially Java and Python. If that is what you want, do not hesitate to join me on this journey!

Subscribe to my YouTube channel:
Рекомендации по теме
Комментарии
Автор

Thank you for making the WebClient very simple to understand. Keep up the good work.

zed
Автор

Great straightforward video. I really appreciate that you got right to the point. Finally gave me the answer I've been looking for.

alexisraels
Автор

as a cat lover I approve this . Also, I modified the code a little by adding controller file for catfacts, and another controller file for dogfacts, and now my API can call both cats and dogs API. thanks to you! 😺🐶

anishaa
Автор

How to put headers and body as input to the get or post request

anshulagarwal
Автор

Nice valuable information thanks for sharing it with us ❤

Sp_Travel_Vlogger
Автор

Simple and easy example to understand !!!
Are you not closing the WebClient underlying connection ?

jitendrapatil
Автор

Nice little demo but where is the benefit of going async? With your example there is none.

petermuller
Автор

Someone knows if this dependecy is still working?

mtytlfz
Автор

Anytime I tried to add the depenency into my project it says it can not be foudn :(

tristenmartinez
Автор

is it okay to have webflux and web in the same project or do I have to use a complete reactive project if I want to use webclient?

ianwanjala
Автор

Can you explain what a mono of a object / class is? I’m still trying to understand

DalisYn
Автор

When I try something like .bodyToMono(Student.class), I get the error : Content type 'application/json' not supported for bodyType. Do you have any idea what may causes to this ?

kadiraka