Buy commercial curl support from WolfSSL. We help you work
out your issues, debug your libcurl applications, use the API, port to new
platforms, add new features and more. With a team lead by the curl founder
himself.
Option «urlnum» in the JSON
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Коваленко Анатолий Викторович via curl-users <curl-users_at_cool.haxx.se>
Date: Sat, 3 Jul 2021 14:28:24 +0300
In Windows PowerShell getting HTTP-head (parameter «-I») for TWO files (the link contains «{32,64}»)
at one command and save the cURL report into the variable:
> curl.exe -V
curl 7.77.0 (x86_64-pc-win32) libcurl/7.77.0 OpenSSL/1.1.1k (Schannel) zlib/1.2.11 brotli/1.0.9 zstd/1.5.0 libidn2/2.3.1 libssh2/1.9.0 nghttp2/1.43.0 libgsasl/1.10.0 libmetalink/0.1.3
Release-Date: 2021-05-26
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS brotli gsasl HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz Metalink MultiSSL NTLM SPNEGO SSL SSPI TLS-SRP Unicode UnixSockets zstd
> $Report = curl.exe -I -w "%{JSON}" "https://curl.se/windows/dl-7.77.0_2/curl-7.77.0_2-win{32,64}-mingw.zip"
> $Report.GetType()
IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True True Object[] System.Array
> $Report.Length
45
> $Report[44].GetType()
IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True True String System.Object
> $Report[44]
{"content_type":"application/zip","errormsg":null,"exitcode":0,"filename_effective":null,"ftp_entry_path":null,"http_code":200,"http_connect":0,"http_version":"2","local_ip":"","local_port":-1,"method":"HEAD","num_connects":0,"num_headers":19,"num_redirects":0,"proxy_ssl_verify_result":0,"redirect_url":null,"referer":null,"remote_ip":"151.101.194.49","remote_port":443,"response_code":200,"scheme":"HTTPS","size_download":0,"size_header":729,"size_request":119,"size_upload":0,"speed_download":0,"speed_upload":0,"ssl_verify_result":0,"time_appconnect":0.000095,"time_connect":0.000095,"time_namelookup":0.000094,"time_pretransfer":0.051093,"time_redirect":0.000000,"time_starttransfer":0.102164,"time_total":0.102225,"url":"https://curl.se/windows/dl-7.77.0_2/curl-7.77.0_2-win64-mingw.zip","url_effective":"https://curl.se/windows/dl-7.77.0_2/curl-7.77.0_2-win64-mingw.zip","urlnum":0,"curl_version":"libcurl/7.77.0 OpenSSL/1.1.1k (Schannel) zlib/1.2.11 brotli/1.0.9 zstd/1.5.0 libidn2!
/2.3.1 libssh2/1.9.0 nghttp2/1.43.0 libgsasl/1.10.0"}
Why «"urlnum":0» for the SECOND file?
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2021-07-03
Date: Sat, 3 Jul 2021 14:28:24 +0300
In Windows PowerShell getting HTTP-head (parameter «-I») for TWO files (the link contains «{32,64}»)
at one command and save the cURL report into the variable:
> curl.exe -V
curl 7.77.0 (x86_64-pc-win32) libcurl/7.77.0 OpenSSL/1.1.1k (Schannel) zlib/1.2.11 brotli/1.0.9 zstd/1.5.0 libidn2/2.3.1 libssh2/1.9.0 nghttp2/1.43.0 libgsasl/1.10.0 libmetalink/0.1.3
Release-Date: 2021-05-26
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS brotli gsasl HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz Metalink MultiSSL NTLM SPNEGO SSL SSPI TLS-SRP Unicode UnixSockets zstd
> $Report = curl.exe -I -w "%{JSON}" "https://curl.se/windows/dl-7.77.0_2/curl-7.77.0_2-win{32,64}-mingw.zip"
> $Report.GetType()
IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True True Object[] System.Array
> $Report.Length
45
> $Report[44].GetType()
IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True True String System.Object
> $Report[44]
{"content_type":"application/zip","errormsg":null,"exitcode":0,"filename_effective":null,"ftp_entry_path":null,"http_code":200,"http_connect":0,"http_version":"2","local_ip":"","local_port":-1,"method":"HEAD","num_connects":0,"num_headers":19,"num_redirects":0,"proxy_ssl_verify_result":0,"redirect_url":null,"referer":null,"remote_ip":"151.101.194.49","remote_port":443,"response_code":200,"scheme":"HTTPS","size_download":0,"size_header":729,"size_request":119,"size_upload":0,"speed_download":0,"speed_upload":0,"ssl_verify_result":0,"time_appconnect":0.000095,"time_connect":0.000095,"time_namelookup":0.000094,"time_pretransfer":0.051093,"time_redirect":0.000000,"time_starttransfer":0.102164,"time_total":0.102225,"url":"https://curl.se/windows/dl-7.77.0_2/curl-7.77.0_2-win64-mingw.zip","url_effective":"https://curl.se/windows/dl-7.77.0_2/curl-7.77.0_2-win64-mingw.zip","urlnum":0,"curl_version":"libcurl/7.77.0 OpenSSL/1.1.1k (Schannel) zlib/1.2.11 brotli/1.0.9 zstd/1.5.0 libidn2!
/2.3.1 libssh2/1.9.0 nghttp2/1.43.0 libgsasl/1.10.0"}
Why «"urlnum":0» for the SECOND file?
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2021-07-03