type: (character) a file type, guessed by mime::guess_type if not given
Examples
## Not run:# imagepath <- file.path(Sys.getenv("R_DOC_DIR"),"html/logo.jpg")(x <- HttpClient$new(url ="https://hb.opencpu.org"))res <- x$post(path ="post", body = list(y = upload(path)))res$content
# text file, in a listfile <- upload(system.file("CITATION"))res <- x$post(path ="post", body = list(y = file))jsonlite::fromJSON(res$parse("UTF-8"))# text file, as datares <- x$post(path ="post", body = file)jsonlite::fromJSON(res$parse("UTF-8"))## End(Not run)