DELETE使用CURL和编码的URL [英] DELETE using CURL with encoded URL

查看:184
本文介绍了DELETE使用CURL和编码的URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用CURL发出请求,如下所示:

I’m trying to make a request using CURL like this:

curl -X DELETE "https://myhost/context/path/users/OXYugGKg207g5uN/07V" 

其中 OXYugGKg207g5uN / 07V

where OXYugGKg207g5uN/07V is a hash, so I suppose that I need to encode before do this request.

我试过了 curl - X DELETE --data-urlencondedhttps:// myhost / context / path / users / OXYugGKg207g5uN / 07V

I have tried curl -X DELETE --data-urlenconded "https://myhost/context/path/users/OXYugGKg207g5uN/07V"

/ p>

Some ideas?

推荐答案

如果真的 OXYugGKg207g5uN / 07V 那不是整个url。您可以使用在您使用cURL的环境中可用的编码函数。

If really OXYugGKg207g5uN/07V is the hash then you need to encode that, not the whole url. You can use an encoding function available inside the environment you use cURL in.

这篇关于DELETE使用CURL和编码的URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆