curl - 您可以使用例如 nc 或 wget 而不使用 curl 来发出 http 请求吗?(忙箱)
问题描述
我目前在 Kubernetes Pod 中使用了一个 busybox,并希望让这个容器(busybox)像这样运行一个 http 删除请求:
while true; do curl -X DELETE https://blabla.com/api/v1/messages; sleep 604800; done
由于 curl 不起作用(在图像中不可用)但 nc 和 wget 会起作用,有没有一种在这种情况下使用它们的好方法?
解决方案
得到:
wget --method=DELETE https://blabla.com/api/v1/messages
在标准输出中得到结果,比如在 curl
wget -q -O - --method=DELETE http://localhost:8080
推荐阅读
- python - 在模板中显示来自模型的视频 - Django
- kubernetes - Istio AuthorizationPolicy 规则问题
- amazon-web-services - 使用 aws amplify 部署 nuxt 应用程序时出现重定向错误
- c - 溢出如何不同地发生?
- arrays - 如何在fortran的do循环中替换所有出现的二维数组元素
- python - 将带有标签的 html 转换为 spaCy 训练数据
- html - 在响应模式下减少引导程序中 col-lg 之间的空间
- php - 如何安全地更改 PHP session.save_path 权限以允许内置服务器工作
- php - 在按键分组的元素中显示数组值
- python - tia 库 (bloomberg) 在 PaulMest 分叉后仍然打印错误