4  How can I access APIs from R?

4.1 Introduction

(introduction will be written ~last)

4.1.1 Learning Objectives

After you read this chapter, you will be able to:

  • Describe how {httr2} calls are structured.
  • Create and modify an {httr2} request.
  • Access an HTTP API with {httr2}.

4.1.2 Prerequisites

(prerequisites will be filled in as I write, if I decide to keep this section)

TODO: Somewhere in here, include something along the line of “Principles.”

  • Make as few separate requests as possible.
  • Only request what you need (make requests as small as possible).