Sponsored Content
Full Discussion: CURL syntax
Top Forums Shell Programming and Scripting CURL syntax Post 302957071 by sam@sam on Tuesday 6th of October 2015 05:30:41 PM
Old 10-06-2015
CURL syntax

Topic : cmd to check status of url using Curl
I have below 2 lines which r working fine
Code:
/usr/bin/curl -u user:pasword  http://hostname

Code:
/usr/bin/curl -connect-timeout=10  http://hostname

Now I want to use user:pasword and connect-timeout parameter in one line
Code:
/usr/bin/curl -u user:pasword -connect-timeout=10 http://hostname

but when I execute this cmd a file "onnect-timeout=10" is generated..is any thing wrong with syntax, please suggest your inputs

---------- Post updated at 06:30 AM ---------- Previous update was at 04:57 AM ----------

Problem solved parameter connect-timeout was wrongly defined

Last edited by Don Cragun; 10-22-2015 at 03:06 AM.. Reason: Prevent unintended smiley with NOPARSE tags.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

curl

Aren't there any way to download files as below? For example, I want to download all .html files under the root directory of unix.com/ curl -O https://www.unix.com/*.html This won't work, but please tell me the way to do this. Well, the best way is to get the file list of the directory, but i... (6 Replies)
Discussion started by: Euler04
6 Replies

2. AIX

use of curl

Hi guys , need some help I have to transfer a file from my aix box to another server using ftps protocol, how can i achieve this using curl preferably or any other utility. Thanks Sandeep (0 Replies)
Discussion started by: jayawantsandeep
0 Replies

3. Shell Programming and Scripting

use of curl

I have to transfer a file from my aix box to another server using ftps protocol, how can i achieve this using curl preferably or any other utility. Regards Sandeep (0 Replies)
Discussion started by: jayawantsandeep
0 Replies

4. Shell Programming and Scripting

Using curl in commandline

Hi, I am using curl to hit a url using http in solaris 10 using commandline, I want to transfer an attachment(using multipart curl -F) also as a part of the request. If anyone has used kindly help me with the syntax. I am using below command: /usr/local/bin/curl -v... (1 Reply)
Discussion started by: manishmaha
1 Replies

5. UNIX for Advanced & Expert Users

Syntax error /w curl?

Hello all- I'm (hopefully) trying to replace a WS_FTP (Windows program) job with a curl command in a script on UNIX. In short, this process has been in place for some time, and in curl I am getting directory perm issues, which does not seem to be accurate, since this process has been in place... (2 Replies)
Discussion started by: prestonatwork
2 Replies

6. Shell Programming and Scripting

Help with cURL

Hi all; first of all i need to clarify that i am new to apache2 server configuration and for some needs i want to transfer some files using curl to web directory,so please bear with me: following is the command i m running to transfer file to my web directory: curl -T "q"... (4 Replies)
Discussion started by: arien001
4 Replies

7. UNIX for Advanced & Expert Users

Syntax issue in curl for getting a file from http site

Hi All I am using curl in my client environment. We need to pull a file from the libraries site. All the files are having perticular URL which can be used to get the files. Only issue is, when we fire that command , it will take to authentication page 1st. once authentication is succed, it will... (1 Reply)
Discussion started by: prabirkumardhar
1 Replies

8. Shell Programming and Scripting

How to specify a port with curl?

HI Im trying to use curl to send a xml file and im trying to send it over a specific port poes anyone know how to specify a port with curl? the command im using is C:\curl -X POST -d @C:\myfile.xml http://yourAddress.com/XMLInterface.asp (5 Replies)
Discussion started by: Paul Walker
5 Replies

9. Shell Programming and Scripting

Curl -v logs

Hi All, Seeking for your assistance on how to redirect into another files the logs of curl -v i tried this code below but i got 0 logs. curl -v 'http://127.0.0.0.......' >> test.logs Thanks in advance. BR, (2 Replies)
Discussion started by: znesotomayor
2 Replies

10. Shell Programming and Scripting

Curl command

Hi All, I am using below curl commad and getting output data correctly curl -k -u AASSDD:PPOOII -d "output_mode=csv" --data-urlencode search='search source=*/AASSDDFF/PPOOLLKK**/94.0*ASD-RST* "Caused by" OR "Error: LISTENER WILL BE DISABLED" OR java.lang.reflect.InvocationTargetException |... (1 Reply)
Discussion started by: rakeshtomar82
1 Replies
CURLOPT_SSL_VERIFYHOST(3)				     curl_easy_setopt options					 CURLOPT_SSL_VERIFYHOST(3)

NAME
CURLOPT_SSL_VERIFYHOST - verify the certificate's name against host SYNOPSIS
#include <curl/curl.h> CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_VERIFYHOST, long verify); DESCRIPTION
Pass a long as parameter specifying what to verify. This option determines whether libcurl verifies that the server cert is for the server it is known as. When negotiating TLS and SSL connections, the server sends a certificate indicating its identity. When CURLOPT_SSL_VERIFYHOST(3) is 2, that certificate must indicate that the server is the server to which you meant to connect, or the connection fails. Simply put, it means it has to have the same name in the certificate as is in the URL you operate against. Curl considers the server the intended one when the Common Name field or a Subject Alternate Name field in the certificate matches the host name in the URL to which you told Curl to connect. When the verify value is 1, curl_easy_setopt will return an error and the option value will not be changed. It was previously (in 7.28.0 and earlier) a debug option of some sorts, but it is no longer supported due to frequently leading to programmer mistakes. Future versions will stop returning an error for 1 and just treat 1 and 2 the same. When the verify value is 0, the connection succeeds regardless of the names in the certificate. Use that ability with caution! The default value for this option is 2. This option controls checking the server's certificate's claimed identity. The server could be lying. To control lying, see CUR- LOPT_SSL_VERIFYPEER(3). LIMITATIONS
DarwinSSL: If verify value is 0, then SNI is also disabled. SNI is a TLS extension that sends the hostname to the server. The server may use that information to do such things as sending back a specific certificate for the hostname, or forwarding the request to a specific origin server. Some hostnames may be inaccessible if SNI is not sent. NSS: If CURLOPT_SSL_VERIFYPEER(3) is zero, CURLOPT_SSL_VERIFYHOST(3) is also set to zero and cannot be overridden. DEFAULT
2 PROTOCOLS
All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc. EXAMPLE
CURL *curl = curl_easy_init(); if(curl) { curl_easy_setopt(curl, CURLOPT_URL, "https://example.com"); /* Set the default value: strict name check please */ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 2L); curl_easy_perform(curl); } AVAILABILITY
If built TLS enabled. RETURN VALUE
Returns CURLE_OK if TLS is supported, and CURLE_UNKNOWN_OPTION if not. If 1 is set as argument, CURLE_BAD_FUNCTION_ARGUMENT is returned. SEE ALSO
CURLOPT_SSL_VERIFYPEER(3), CURLOPT_CAINFO(3), libcurl 7.54.0 February 02, 2017 CURLOPT_SSL_VERIFYHOST(3)
All times are GMT -4. The time now is 01:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy