tempfileSHP <- tempfile()
req <- request("https://sso.slip.wa.gov.au/as/token.oauth2") |>
req_headers("Authorization" = "Basic ZGlyZWN0LWRvd25sb2Fk") |>
- req_body_form(list("grant_type" = "password",
- # SLIP username and password stored in
- #pass - the standard unix password manager
- "username" = system2("pass", args = "slip.wa.gov.au | grep Username | sed -e 's/Username: //'", stdout = TRUE),
- "password" = system2("pass", args = "slip.wa.gov.au | head -1", stdout = TRUE)))
+ req_body_form(grant_type = "password",
+ # SLIP username and password stored in
+ # pass - the standard unix password manager
+ username = system2("pass", args = "slip.wa.gov.au | grep Username | sed -e 's/Username: //'", stdout = TRUE),
+ password = system2("pass", args = "slip.wa.gov.au | head -1", stdout = TRUE))
tokenResponse <- req_perform(req)