Browse Source

errant endpoints in various render_ functions

master
boB Rudis 2 years ago
parent
commit
778a577c3f
No known key found for this signature in database GPG Key ID: 1D7529BE14E2BBA9
5 changed files with 13 additions and 4 deletions
  1. +1
    -1
      R/render-har.r
  2. +1
    -1
      R/render-jpg.r
  3. +8
    -1
      R/render-json.r
  4. +1
    -1
      R/render-png.r
  5. +2
    -0
      README.Rmd

+ 1
- 1
R/render-har.r View File

@@ -40,7 +40,7 @@ render_har <- function(splash_obj = splash_local, url, base_url, response_body=F
res <- httr::GET(splash_url(splash_obj), path="render.har", encode="json", query=params)
} else {
res <- httr::GET(
splash_url(splash_obj), path="render.html", encode="json", query=params,
splash_url(splash_obj), path="render.har", encode="json", query=params,
httr::authenticate(splash_obj$user, splash_obj$pass)
)
}


+ 1
- 1
R/render-jpg.r View File

@@ -46,7 +46,7 @@ render_jpeg <- render_jpg <- function(
res <- httr::GET(splash_url(splash_obj), path="render.jpeg", encode="json", query=params)
} else {
res <- httr::GET(
splash_url(splash_obj), path="render.html", encode="json", query=params,
splash_url(splash_obj), path="render.jpeg", encode="json", query=params,
httr::authenticate(splash_obj$user, splash_obj$pass)
)
}


+ 8
- 1
R/render-json.r View File

@@ -64,7 +64,14 @@ render_json <- function(splash_obj = splash_local, url, base_url=NULL, quality=7
if (!missing(save_args)) params$save_args <- jsonlite::unbox(save_args)
if (!missing(load_args)) params$load_args <- jsonlite::unbox(load_args)

res <- httr::GET(splash_url(splash_obj), path="render.json", encode="json", query=params)
if (is.null(splash_obj$user)) {
res <- httr::GET(splash_url(splash_obj), path="render.json", encode="json", query=params)
} else {
res <- httr::GET(
splash_url(splash_obj), path="render.json", encode="json", query=params,
httr::authenticate(splash_obj$user, splash_obj$pass)
)
}

httr::stop_for_status(res)



+ 1
- 1
R/render-png.r View File

@@ -51,7 +51,7 @@ render_png <- function(
res <- httr::GET(splash_url(splash_obj), path="render.png", encode="json", query=params)
} else {
res <- httr::GET(
splash_url(splash_obj), path="render.html", encode="json", query=params,
splash_url(splash_obj), path="render.png", encode="json", query=params,
httr::authenticate(splash_obj$user, splash_obj$pass)
)
}


+ 2
- 0
README.Rmd View File

@@ -119,6 +119,8 @@ Suggest more in a feature req!
### Installation

```{r eval=FALSE}
devtools::install_git("https://gitlab.com/hrbrmstr/splashr.git")
# or
devtools::install_github("hrbrmstr/splashr")
```



Loading…
Cancel
Save