The first time I needed to access a third-party API on the web I remember doing something like the following (in PHP):
$data = file_get_contents('http://a/resource/somewhere');
This has the advantage of being really easy to read: like all other parts of my code, I assign a variable to an expression and expect that it will be filled with a value of some sort. What I never thought about at the time was how much was going on behind the scenes: unlike an basic expression that performs a math operation or comparison, a whole HTTP request and response is going on before
$data can be filled. During this time, my program pauses and no further code is executed.