
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
import road from "road"
//默认使用get请求
road("/")
.setData({})
.request((res)=>{
console.log(res)
})
//也可以调用get方法发起请求,可以这样调用 put 、post、delete等请求方法
road.get("/")
.setHeader({
"Content-type":"application/json"
})
.request((res)=>{
console.log(res)
})
// 也可以使用object来调用
road({
type:"GET",
header:{
"COntent-type":"application/json"
},
data:{}, //需要发送到服务器的数据
actionType:"REQUEST_SUCCESS", // 在redux环境下可以设定actionType来将请求数据保存到store中
success:(res)=>{},
error:(res)=>{}, //请求错误时的调用函数 ,不定义将使用setDefaultError定义的默认错误处理函数
}).request()
// 可以通过设置delay来启动轮询请求
let loop = road.get("/")
loop.setDelay(1000) //设置轮询的请求间隔
loop.request((res)=>{
console.log(res)
})
// 调用cancelLoop 取消轮询
loop.cancelLoop()
FAQs
We found that road-http demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.