CURL syntax


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting CURL syntax
# 1  
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.
# 2  
Old 10-06-2015
Code:
use --connect-timeout TIMEOUT

man curl or curl --help for the usage.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
Login or Register to Ask a Question