r-lib / httr2

Make HTTP requests and process their responses. A modern reimagining of httr.
https://httr2.r-lib.org
Other
237 stars 57 forks source link

URL substitution #9

Closed jennybc closed 3 years ago

jennybc commented 5 years ago

Think about the common patterns used to document REST APIs, i.e. the colon signals a placeholder, and hooking this up nicely to glue(). Relates to glue transformers.

GitHub: GET /repos/:owner/:repo/topics

Canvas: DELETE /api/v1/courses/:course_id/discussion_topics/:topic_id

jennybc commented 3 years ago

I have since gained experience with the URI template style of RFC 6570 in gh:

https://github.com/r-lib/gh/blob/e936ee46ea6719bff963c2e331e7cbbb9613ef95/R/gh_request.R#L189-L222