Xml 如何将wget请求转换为http请求

Xml 如何将wget请求转换为http请求,xml,xmlhttprequest,Xml,Xmlhttprequest,我使用: wget--无检查证书--http user=user--http password=secret--header=“内容类型:text/xml”--post file=request.xml 发送xml请求 xml文件(request.xml)类似于: <?xml version="1.0" encoding="UTF-8"?> <request method="switchvox.call"> <parameters> <dial_firs

我使用:

wget--无检查证书--http user=user--http password=secret--header=“内容类型:text/xml”--post file=request.xml

发送xml请求

xml文件(request.xml)类似于:

<?xml version="1.0" encoding="UTF-8"?>
<request method="switchvox.call">
<parameters>
<dial_first>1111</dial_first>
<dial_second>2222</dial_second>
<dial_as_account_id>1127</dial_as_account_id>
<caller_id_name>John Doe</caller_id_name>
</parameters>
</request>

1111
2222
1127
无名氏
在编写程序之前,我需要测试一些xml请求

是否可以使用浏览器发送相同的请求? 是否可以在浏览器中使用复制粘贴来测试请求?
可以在浏览器请求中发送xml文件吗?

我不知道使用浏览器会发送xml文件,但您可以使用Fiddler创建包含任何内容的原始http请求

如果希望/需要重新创建http请求,还可以在浏览站点时捕获这些请求

是否可以使用浏览器发送相同的请求

由于您在请求中使用的是非标准(用于浏览器表单)内容类型:仅通过将JavaScript与XMLHttpRequest结合使用

是否可以在浏览器中使用复制粘贴来测试请求

不,您可以编写脚本,然后将其复制并粘贴到JS控制台中

是否可以在浏览器请求中发送xml文件

考虑到上面的限制条件,是的,但它似乎比您现有的解决方案更麻烦