Closed kaneplusplus closed 2 years ago
I could try using a temp file. See example: https://github.com/rexyai/RestRserve/blob/master/inst/examples/plot-ggplot/app.R#L13-L18
Why are you trying to send the body on a get request?
@artemklevtsov but POST also doesn't work.
@kaneplusplus Thanks, for reporting. That's look weird. WARNING: discarding buffer because too big (awaiting 3544139755222689071 bytes)
- this comes from Rserve backend. I think something is wrong with how httr
encodes the body, but not 100% sure. I will investigate.
@dselivanov Thanks so much for taking a look. If it's better to loop Simon Urbanek in, I can let him know.
@artemklevtsov The structure of the object that I want to pass to the server is a bit more complicated. I was trying to provide a minimal example. It's a good point that it might be better as a POST.
@kaneplusplus the answer is easy! you are sending request to 8000 port (why?) which is Rserve binary port, not http server port which is 8080 by default. Try
content(GET(paste("http://localhost:8080", "echo", sep = "/"),
body = serialize("hello world", NULL),
encode = "raw", content_type("application/rds"),
accept("application/rds")))
@kaneplusplus when you specify backend$start(s, port = 8000)
this is related to Rserve binary port. For http port see http_port
argument.
Ugh. Sorry and thanks very much for pointing this out.
... Also, thanks very much for the package. I just did a few preliminary tests and it seems to be significantly faster than others.
I'm running into an issue using RestRserve from a client where I'm passing serialized R objects. I'm currently trying to call via httr. Is there another preferred methods? an example is as follows.
From an R session:
From R session 2:
When I call the code from the second session I get the following error message in R session 1:
And the following message in session 2:
I think the server is set up correctly since it services local requests. Is there another preferred way of making request from another process? Any help would be appreciated.