【发布时间】:2016-12-12 20:09:54
【问题描述】:
我尝试在 page 上复制部分示例。但是,当我尝试http://my-host:8000/input?val=1 时,它给了我错误{"error":["404 - Resource Not Found"]}
我错过了什么吗?
plumb-test.R
mylist <- 15
#* @post /input
function(val, res){
v <- as.numeric(val)
if (is.na(v)){
res$status <- 400
res$body <- "val parameter must be a number"
return(res)
}
mylist <<- c(mylist,val)
list(result="success")
}
【问题讨论】: