http://httpbin.org 测试接口解析

本文详细介绍了一款用于HTTP请求响应测试的工具HTTPBin。该工具覆盖了各种HTTP场景,包括GET、POST、PUT等请求方式,并提供了如gzip压缩、状态码返回、重定向等功能。文章还提供了详细的安装和使用指南。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

介绍:

HTTP库的测试一般来说较为繁琐,一些同学较为熟悉的RequestBin虽然好用,但只能测试POST,且无法控制其response。HTTPBin是以Python+Flask写的一款工具,它cover了各类的HTTP场景,且每个接口一定都有返回。

安装方法

使用pip工具分别安装httpbin与guicorn,guicorn是一个wsgi http服务器,详见guicorn 是什么

#安装pip工具
[root@localhost ~]# wget https://bootstrap.pypa.io/get-pip.py
[root@localhost ~]# python get-pip.py
#分别使用pip工具安装guicorn与httpbin
[root@localhost ~]# pip install httpbin
[root@localhost ~]# pip install guicorn
#启动httpbin
[root@localhost ~]# gunicorn -b :8000 httpbin:app
[2017-07-11 16:25:29 +0000] [21088] [INFO] Starting gunicorn 19.7.1
[2017-07-11 16:25:29 +0000] [21088] [INFO] Listening at: http://0.0.0.0:8000 (21088)
[2017-07-11 16:25:29 +0000] [21088] [INFO] Using worker: sync
[2017-07-11 16:25:29 +0000] [21093] [INFO] Booting worker with pid: 21093
#访问httpbin主页面
[root@localhost ~]# lynx localhost:8000

 

接口列表

EndpointDescirption
/This page.
/ipReturns Origin IP.
/user-agentReturns user-agent.
/headersReturns header dict.
/getReturns GET data.
/postReturns POST data.
/patchReturns PATCH data.
/putReturns PUT data.
/deleteReturns DELETE data
/gzipReturns gzip-encoded data.
/deflateReturns deflate-encoded data.
/status/:codeReturns given HTTP Status code.
/response-headersReturns given response headers.
/redirect/:n302 Redirects n times.
/redirect-to?url=foo302 Redirects to the foo URL.
/relative-redirect/:n302 Relative redirects n times.
/cookiesReturns cookie data.
/cookies/set?name=valueSets one or more simple cookies.
/cookies/delete?nameDeletes one or more simple cookies.
/basic-auth/:user/:passwdChallenges HTTPBasic Auth.
/hidden-basic-auth/:user/:passwd404'd BasicAuth.
/digest-auth/:qop/:user/:passwdChallenges HTTP Digest Auth.
/stream/:nStreams n – 100 lines.
/delay/:nDelays responding for n – 10 seconds.
/dripDrips data over a duration after an optional initial delay, then (optionally) returns with the given status code.
/range/:nStreams n bytes, and allows specifying a Range header to select a subset of the data. Accepts a chunk_size and request duration parameter.
/htmlRenders an HTML Page.
/robots.txtReturns some robots.txt rules.
/denyDenied by robots.txt file.
/cacheReturns 200 unless an If-Modified-Since or If-None-Match header is provided, when it returns a 304.
/cache/:nSets a Cache-Control header for n seconds.
/bytes/:nGenerates n random bytes of binary data, accepts optional seed integer parameter.
/stream-bytes/:nStreams n random bytes of binary data, accepts optional seed and chunk_size integer parameters.
/links/:nReturns page containing n HTML links.
/forms/postHTML form that submits to /post
/xmlReturns some XML
/encoding/utf8Returns page containing UTF-8 data.

例子

[root@localhost ~]# curl http://httpbin.org/ip
{
  "origin": "218.189.127.78"
}
[root@localhost ~]# curl http://httpbin.org/user-agent
{
  "user-agent": "curl/7.29.0"
}
[root@localhost ~]# curl https://httpbin.org/get?show_env=1
{
  "args": {
    "show_env": "1"
  }, 
  "headers": {
    "Accept": "*/*", 
    "Connect-Time": "0", 
    "Connection": "close", 
    "Host": "httpbin.org", 
    "Total-Route-Time": "0", 
    "User-Agent": "curl/7.29.0", 
    "Via": "1.1 vegur", 
    "X-Forwarded-For": "218.189.127.78", 
    "X-Forwarded-Port": "443", 
    "X-Forwarded-Proto": "https", 
    "X-Request-Id": "392e0fda-5f1b-4cc8-8131-77967bfee9db", 
    "X-Request-Start": "1499761771703"
  }, 
  "origin": "218.189.127.78", 
  "url": "https://httpbin.org/get?show_env=1"
}
[root@localhost ~]# curl -I http://httpbin.org/status/418
HTTP/1.1 418 I'M A TEAPOT
Connection: keep-alive
Server: meinheld/0.6.1
Date: Tue, 11 Jul 2017 08:29:40 GMT
X-Processed-Time: 0.000515937805176
Access-Control-Allow-Origin: *
X-More-Info: http://tools.ietf.org/html/rfc2324
Access-Control-Allow-Credentials: true
X-Powered-By: Flask
Content-Length: 135
Via: 1.1 vegur

[root@localhost ~]# curl http://httpbin.org/get
{
  "args": {}, 
  "headers": {
    "Accept": "*/*", 
    "Connection": "close", 
    "Host": "httpbin.org", 
    "User-Agent": "curl/7.29.0"
  }, 
  "origin": "218.189.127.78", 
  "url": "http://httpbin.org/get"
}

参考

1、 kennethreitz/httpbin

2、guicorn是什么

转载链接:https://www.jianshu.com/p/00db00cd287d
 

“黑名单管理”页面 404 问题的详细总结 1. 核心症状 现象: 在管理后台(前端地址 http://localhost:5002),访问“系统管理” -> “黑名单管理”页面时,页面框架能正常加载,但数据表格处提示红字错误 “Request failed with status code 404”。 网络请求: 浏览器开发者工具的“网络”面板显示,前端页面发起了一个 GET 请求到 http://localhost:5002/api/v1/blacklist/list,并收到了 404 (Not Found) 响应。 2. 问题分析:为什么是 404? 这个 404 的根本原因是 前端请求地址错误。 前端开发服务器运行在 http://localhost:5002。 后端 API 服务器运行在 http://localhost:5003。 前端本应将 API 请求(/api/...)代理转发给 http://localhost:5003,但实际上它错误地请求了自身(http://localhost:5002),而前端服务器上并不存在 /api/v1/blacklist/list 这个路径,所以返回 404。 3. 关键症结:Vite 代理配置为何不生效? 问题的核心在于,前端项目 admin-platform/web/下的 vite.config.js 文件中的 server.proxy 代理配置没有按预期工作。 4. 已尝试的修复措施(及结果) 为了修复代理问题,我们对 admin-platform/web/vite.config.js 进行了修改,试图强制指定代理规则。 修改内容: 我们将 vite.config.js 的 server.proxy 部分修改为明确的硬编码配置: Apply to index.js 修改结果: 无效。重启前端服务后,页面发出的请求地址依然是 http://localhost:5002/...,代理并未生效,问题依旧。 5. 留下的疑问 & 求助方向 目前情况表明,vite.config.js 中的代理规则因为某种我们尚未查明的原因被忽略或覆盖了。 请您的同事帮忙检查: admin-platform/web/ 目录下是否存在 .env、.env.development 等环境变量文件?里面是否有一些配置(如 VITE_USE_PROXY=false)覆盖了 vite.config.js 中的设置? 检查 package.json 中的 dev 脚本,以及 build/ 目录下的其他构建脚本。是否存在更底层的逻辑,在运行时动态修改或覆盖了 Vite 的服务器配置? 这个项目是否使用了某种特殊的网络配置或全局代理,干扰了 Vite 的开发服务器? 我们已经确认了后端的接口 (/api/v1/blacklist/list) 是健康且可以正常访问的(用 curl 或直接访问 http://localhost:5003/api/v1/blacklist/list 可以验证),所以问题几乎可以 100% 锁定在前端的 Vite 配置上。 希望这份总结能帮助您快速同步问题背景,找到症结所在。再次为没能解决问题感到非常抱歉。
07-14
PS C:\Users\Administrator> # 加载必要程序集 - 确保使用正确的方法 PS C:\Users\Administrator> Add-Type -AssemblyName System.Net.Http -ErrorAction Stop PS C:\Users\Administrator> PS C:\Users\Administrator> function Invoke-EnhancedCurlRequest { >> [CmdletBinding()] >> param( >> [Parameter(Mandatory=$true)] >> [string]$Uri, >> [ValidateSet('GET','POST','PUT','DELETE','PATCH','HEAD','OPTIONS')] >> [string]$Method = 'GET', >> [hashtable]$Headers = @{}, >> [object]$Body, >> [int]$Timeout = 30, >> [switch]$SkipCertificateCheck, >> [switch]$UseGzipCompression >> ) >> >> $resultTemplate = [PSCustomObject]@{ >> StatusCode = 0 >> StatusMessage = "NotExecuted" >> Headers = [ordered]@{} >> Content = $null >> IsSuccess = $false >> Technology = "None" >> ErrorMessage = $null >> ElapsedMs = 0 >> } >> >> $timer = [System.Diagnostics.Stopwatch]::StartNew() >> $result = $resultTemplate.PSObject.Copy() >> $result.Technology = "HttpClient" >> >> try { >> $handler = New-Object System.Net.Http.HttpClientHandler >> >> # 修复证书验证 - 兼容旧版 .NET >> if ($SkipCertificateCheck) { >> $handler.ServerCertificateCustomValidationCallback = { >> param($sender, $cert, $chain, $sslPolicyErrors) >> return $true >> } >> } >> >> if ($UseGzipCompression) { >> $handler.AutomaticDecompression = [System.Net.DecompressionMethods]::GZip >> } >> >> $client = New-Object System.Net.Http.HttpClient($handler) >> $client.Timeout = [System.TimeSpan]::FromSeconds($Timeout) >> >> $request = New-Object System.Net.Http.HttpRequestMessage( >> [System.Net.Http.HttpMethod]::Parse($Method), >> $Uri >> ) >> >> # 添加默认 User-Agent >> if (-not $Headers.ContainsKey('User-Agent')) { >> $request.Headers.TryAddWithoutValidation("User-Agent", "PowerShell-HTTPClient/1.0") >> } >> >> # 添加自定义头 >> foreach ($key in $Headers.Keys) { >> if (-not $request.Headers.TryAddWithoutValidation($key, $Headers[$key])) { >> if (-not $request.Content) { >> $request.Content = New-Object System.Net.Http.StringContent("") >> } >> $request.Content.Headers.TryAddWithoutValidation($key, $Headers[$key]) >> } >> } >> >> # 处理请求体 >> if ($Body -and @('POST','PUT','PATCH') -contains $Method) { >> if ($Body -is [byte[]]) { >> $request.Content = New-Object System.Net.Http.ByteArrayContent($Body) >> } >> elseif ($Body -is [hashtable] -or $Body -is [System.Collections.IDictionary]) { >> $jsonBody = $Body | ConvertTo-Json -Depth 5 -Compress >> $request.Content = New-Object System.Net.Http.StringContent( >> $jsonBody, >> [System.Text.Encoding]::UTF8, >> "application/json" >> ) >> } >> elseif ($Body -is [string]) { >> $request.Content = New-Object System.Net.Http.StringContent( >> $Body, >> [System.Text.Encoding]::UTF8 >> ) >> } >> else { >> throw "Unsupported body type: $($Body.GetType().Name)" >> } >> } >> >> # 发送请求 >> $response = $client.SendAsync($request).GetAwaiter().GetResult() >> >> # 解析响应 >> $result.StatusCode = [int]$response.StatusCode >> $result.StatusMessage = $response.ReasonPhrase >> $result.IsSuccess = $response.IsSuccessStatusCode >> >> $result.Headers = [ordered]@{} >> foreach ($header in $response.Headers) { >> $result.Headers[$header.Key] = $header.Value -join ", " >> } >> >> foreach ($header in $response.Content.Headers) { >> $result.Headers[$header.Key] = $header.Value -join ", " >> } >> >> $result.Content = $response.Content.ReadAsStringAsync().GetAwaiter().GetResult() >> return $result >> } >> catch [System.Threading.Tasks.TaskCanceledException] { >> $result.ErrorMessage = "Request timed out after $Timeout seconds" >> $result.StatusCode = 408 >> $result.StatusMessage = "Timeout" >> return $result >> } >> catch { >> # 提供更详细的错误信息 >> $result.ErrorMessage = $_.Exception.ToString() >> $result.StatusCode = 500 >> $result.StatusMessage = "HttpRequestError" >> return $result >> } >> finally { >> $timer.Stop() >> $result.ElapsedMs = $timer.ElapsedMilliseconds >> >> # 清理资源 >> if ($response) { $response.Dispose() } >> if ($request) { $request.Dispose() } >> if ($client) { $client.Dispose() } >> if ($handler) { $handler.Dispose() } >> } >> } >> PS C:\Users\Administrator> $handler.ServerCertificateCustomValidationCallback = { >> param($sender, $cert, $chain, $sslPolicyErrors) >> return $true >> } >> 在此对象上找不到属性“ServerCertificateCustomValidationCallback”。请确认该属性存在并且可设置。 所在位置 行:1 字符: 1 + $handler.ServerCertificateCustomValidationCallback = { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [],RuntimeException + FullyQualifiedErrorId : PropertyNotFound PS C:\Users\Administrator> $handler.ServerCertificateCustomValidationCallback = { >> param($sender, $cert, $chain, $sslPolicyErrors) >> return $true >> } >> 在此对象上找不到属性“ServerCertificateCustomValidationCallback”。请确认该属性存在并且可设置。 所在位置 行:1 字符: 1 + $handler.ServerCertificateCustomValidationCallback = { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [],RuntimeException + FullyQualifiedErrorId : PropertyNotFound PS C:\Users\Administrator> $request.Headers.TryAddWithoutValidation("User-Agent", "PowerShell-HTTPClient/1.0") 不能对 Null 值表达式调用方法。 所在位置 行:1 字符: 1 + $request.Headers.TryAddWithoutValidation("User-Agent", "PowerShell-HT ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [],RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull PS C:\Users\Administrator> $result.ErrorMessage = $_.Exception.ToString() 不能对 Null 值表达式调用方法。 所在位置 行:1 字符: 1 + $result.ErrorMessage = $_.Exception.ToString() + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [],RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull PS C:\Users\Administrator> if ($response) { $response.Dispose() } PS C:\Users\Administrator> # 创建模块目录 PS C:\Users\Administrator> $moduleDir = "$env:ProgramFiles\WindowsPowerShell\Modules\PSHttpClient" PS C:\Users\Administrator> New-Item -Path $moduleDir -ItemType Directory -Force | Out-Null PS C:\Users\Administrator> PS C:\Users\Administrator> # 生成并保存模块文件 PS C:\Users\Administrator> $fixedModuleCode = @' >> <上面修复后的完整函数代码> >> '@ >> $fixedModuleCode | Out-File "$moduleDir\PSHttpClient.psm1" -Encoding UTF8 -Force >> PS C:\Users\Administrator> # 重新加载模块 PS C:\Users\Administrator> Remove-Module PSHttpClient -ErrorAction SilentlyContinue PS C:\Users\Administrator> Import-Module PSHttpClient -Force -PassThru < : 无法将“<”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后 再试一次。 所在位置 C:\Program Files\WindowsPowerShell\Modules\PSHttpClient\PSHttpClient.psm1:1 字符: 1 + <上面修复后的完整函数代码> + ~ + CategoryInfo : ObjectNotFound: (<:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException ModuleType Version Name ExportedCommands ---------- ------- ---- ---------------- Script 1.3 PSHttpClient PS C:\Users\Administrator> # 测试基本GET请求 PS C:\Users\Administrator> $response = Invoke-EnhancedCurlRequest -Uri "https://httpbin.org/get" -Method GET PS C:\Users\Administrator> PS C:\Users\Administrator> if ($response.IsSuccess) { >> Write-Host "✅ 模块工作正常" -ForegroundColor Green >> $response.Content | ConvertFrom-Json >> } else { >> Write-Host "❌ 模块存在问题: $($response.ErrorMessage)" -ForegroundColor Red >> } >> ❌ 模块存在问题: System.Management.Automation.RuntimeException: 方法调用失败,因为 [System.Net.Http.HttpMethod] 不包含名为“Parse”的方法。 在 System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception) 在 System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame) 在 System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) 在 System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) PS C:\Users\Administrator> ✅ 模块工作正常 ✅ : 无法将“✅”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后 再试一次。 所在位置 行:1 字符: 1 + ✅ 模块工作正常 + ~ + CategoryInfo : ObjectNotFound: (✅:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException PS C:\Users\Administrator> PS C:\Users\Administrator> args : {} args : 无法将“args”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确 ,然后再试一次。 所在位置 行:1 字符: 1 + args : {} + ~~~~ + CategoryInfo : ObjectNotFound: (args:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException PS C:\Users\Administrator> headers : @{Accept=*/*; Accept-Encoding=gzip, deflate, br; Host=httpbin.org; User-Agent=PowerShell-HTTPClient/1.0; 所在位置 行:1 字符: 31 + headers : @{Accept=*/*; Accept-Encoding=gzip, deflate, br; Host=httpb ... + ~ 哈希文本中的键后面缺少“=”运算符。 所在位置 行:1 字符: 31 + headers : @{Accept=*/*; Accept-Encoding=gzip, deflate, br; Host=httpb ... + ~ 哈希文本不完整。 所在位置 行:1 字符: 25 + headers : @{Accept=*/*; Accept-Encoding=gzip, deflate, br; Host=httpb ... + ~~~~~~ 哈希文本中不允许包含重复的键“Accept”。 + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException + FullyQualifiedErrorId : MissingEqualsInHashLiteral PS C:\Users\Administrator> X-Amzn-Trace-Id=Root=1-66c8f1b5-1234567890abcdef12345678} 所在位置 行:1 字符: 67 + X-Amzn-Trace-Id=Root=1-66c8f1b5-1234567890abcdef12345678} + ~ 表达式或语句中包含意外的标记“}”。 + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException + FullyQualifiedErrorId : UnexpectedToken PS C:\Users\Administrator> url : https://httpbin.org/get url : 无法将“url”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确, 然后再试一次。 所在位置 行:1 字符: 1 + url : https://httpbin.org/get + ~~~ + CategoryInfo : ObjectNotFound: (url:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException PS C:\Users\Administrator> # 重新加载模块 PS C:\Users\Administrator> Remove-Module PSHttpClient -ErrorAction SilentlyContinue PS C:\Users\Administrator> Import-Module PSHttpClient -Force < : 无法将“<”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后 再试一次。 所在位置 C:\Program Files\WindowsPowerShell\Modules\PSHttpClient\PSHttpClient.psm1:1 字符: 1 + <上面修复后的完整函数代码> + ~ + CategoryInfo : ObjectNotFound: (<:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException PS C:\Users\Administrator> PS C:\Users\Administrator> # 测试用例 PS C:\Users\Administrator> $testCases = @( >> @{Url = "https://httpbin.org/get"; Method = "GET"; ExpectedCode = 200} >> @{Url = "https://httpbin.org/post"; Method = "POST"; Body = @{name="Test"}; ExpectedCode = 200} >> @{Url = "https://self-signed.badssl.com/"; Method = "GET"; SkipCertificateCheck = $true; ExpectedCode = 200} >> @{Url = "https://invalid.domain.abc/"; Method = "GET"; ExpectedCode = 0} >> ) >> PS C:\Users\Administrator> # 执行测试 PS C:\Users\Administrator> $results = foreach ($test in $testCases) { >> $params = @{ >> Uri = $test.Url >> Method = $test.Method >> } >> >> if ($test.Body) { $params['Body'] = $test.Body } >> if ($test.SkipCertificateCheck) { $params['SkipCertificateCheck'] = $true } >> >> $result = Invoke-EnhancedCurlRequest @params >> >> [PSCustomObject]@{ >> TestCase = $test.Url >> Method = $test.Method >> Status = if ($result.StatusCode -eq $test.ExpectedCode) { "✅ PASS" } else { "❌ FAIL" } >> StatusCode = $result.StatusCode >> Expected = $test.ExpectedCode >> Success = $result.IsSuccess >> Tech = $result.Technology >> Error = if ($result.ErrorMessage) { $result.ErrorMessage } else { "None" } >> Time = Get-Date -Format "HH:mm:ss" >> } >> } >> 方法调用失败,因为 [System.Management.Automation.PSCustomObject] 不包含名为“Dispose”的方法。 所在位置 行:114 字符: 26 + if ($response) { $response.Dispose() } + ~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (Dispose:String) [],RuntimeException + FullyQualifiedErrorId : MethodNotFound 方法调用失败,因为 [System.Management.Automation.PSCustomObject] 不包含名为“Dispose”的方法。 所在位置 行:114 字符: 26 + if ($response) { $response.Dispose() } + ~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (Dispose:String) [],RuntimeException + FullyQualifiedErrorId : MethodNotFound 方法调用失败,因为 [System.Management.Automation.PSCustomObject] 不包含名为“Dispose”的方法。 所在位置 行:114 字符: 26 + if ($response) { $response.Dispose() } + ~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (Dispose:String) [],RuntimeException + FullyQualifiedErrorId : MethodNotFound 方法调用失败,因为 [System.Management.Automation.PSCustomObject] 不包含名为“Dispose”的方法。 所在位置 行:114 字符: 26 + if ($response) { $response.Dispose() } + ~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (Dispose:String) [],RuntimeException + FullyQualifiedErrorId : MethodNotFound PS C:\Users\Administrator> # 显示结果 PS C:\Users\Administrator> $results | Format-Table -AutoSize TestCase Method Status StatusCode Expected Success Tech Error -------- ------ ------ ---------- -------- ------- ---- ----- https://httpbin.org/get GET ❌ FAIL 500 200 False HttpClient System.Management.Automation.Ru... https://httpbin.org/post POST ❌ FAIL 500 200 False HttpClient System.Management.Automation.Ru... https://self-signed.badssl.com/ GET ❌ FAIL 500 200 False HttpClient System.Management.Automation.Ru... https://invalid.domain.abc/ GET ❌ FAIL 500 0 False HttpClient System.Management.Automation.Ru... PS C:\Users\Administrator>
最新发布
08-17
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值