DRDataRaft/ docs
GitHub ↗

ide_request()

Requests are limited to 16 KiB before decoding. No R expressions are parsed or evaluated. Only named operations and exact binding handles are accepted. Invalid requests without a valid response channel return an invisible error envelope and do not write a file. Active and delayed bindings are skipped. Trials can execute user transformations and read sources; this bridge never exposes a production publication operation. Response writes must remain inside the canonical response_root configured by trusted ide_context() code. This is a path boundary for requests, not a sandbox against R code running as the same user. Contract reads must stay within context$contract_root.

Usage

ide_request(encoded, context = ide_context())

Arguments

encoded
Base64 JSON request following the metadata-v1 schema (wire version 1), or the diagnostics-v1 schema (wire version 2).


context
Context from ide_context().

Value

Invisibly, a redacted envelope; valid response channels receive it atomically.

Examples

private <- tempfile("ide-private-")
dir.create(private, mode = "0700")
request <- list(
  version = 1L, operation = "products", request_id = "example",
  response_path = file.path(private, "response.json")
)
encoded <- jsonlite::base64_enc(charToRaw(as.character(
  jsonlite::toJSON(request, auto_unbox = TRUE)
)))
response <- ide_request(gsub("[[:space:]]", "", encoded),
                        ide_context(new.env(parent = emptyenv())))
response$contract
unlink(private, recursive = TRUE)
Documentation source snapshot · View source at 282f129 ↗
Code examples are documented source examples; they are not executed in this website build.

Search documentation

Search functions, packages and guides.