Template:REST API GET sample code (curl)
From Linux Web Expert
$ curl "https://en.wikipedia.org/w/rest.php/some/path"
# Sample code
$ curl "https://test.example/foo?x=1&y=2"
Template documentation
[create]
$ curl "https://en.wikipedia.org/w/rest.php/some/path"
# Sample code
$ curl "https://test.example/foo?x=1&y=2"