perl - Perl SOAP::LITE — 如何添加 http 请求头
问题描述
我有一个应用程序,想在其中添加 http 标头(不是肥皂标头),但无法弄清楚,任何可以提供帮助的人。
解决方案
我必须使用以下代码设置 http 请求标头:
my $transport = $service->transport;
my $http_request = $transport->http_request;
$http_request->header('x-api-key' => 'xaefdsfse' );
$http_request->header('Content-Type' => 'application/soap+xml' );
在肥皂调用之前添加此代码。
推荐阅读
- vpn - 无法通过 OpenVPN 连接到 VPN 服务器
- linux - shmget() 什么时候返回零 shmid?
- javascript - 使用同一类检查多个复选框
- python - 将一串ndarray转换为ndarray
- javascript - Nuxt axios 无法处理服务器响应
- javascript - 使用 .unshift 进行反应以将变量推入状态的最佳方法
- java - 使用 Jasper 报告添加数字签名字段
- facebook - Facebook 图表页面/帖子见解 - 权限错误
- python - 如何在python中将图像类型从GIF转换为PNG/JPG
- transactions - 错误:非数字(未知)预期类型 Double