これはnginx
とどのように関連しているのか分かりませんが、これはリバースプロキシとしてのみ動作するため、Rserve設定を変更する必要がないためです。
しかし、あなたがやりたいし、その後(Rserveから引用)以下を返すことができ
.http.request <- function(url, query, body, headers, ...)
として定義するだけの機能であることを.http.request
があります
the result is expected to have one of the following forms:
a) character vector of length 1 => error (possibly from try),
will create 500 response
b) list(payload[, content-type[, headers[, status code]]])
payload: can be a character vector of length one or a
raw vector. if the character vector is named "file" then
the content of a file of that name is the payload
content-type: must be a character vector of length one
or NULL (if present, else default is "text/html")
headers: must be a character vector - the elements will
have CRLF appended and neither Content-type nor
Content-length may be used
status code: must be an integer if present (default is 200)
のみペイロードは、必須ですそれ以外はすべてオプションです。 tryCatch({ ... }, error=function(e) e$message)
のようなコードでコードを折り返して、エラーが発生した場合の出力を確認することをお勧めします。 Rserve関連の質問のためのstats-rosuda-develメーリングリストを使用することを検討してください:これは内蔵のHTTPサーバR.
に
PSで使用されるのと同じAPIであることを
注意。