Sponsored Content
Top Forums Shell Programming and Scripting Rest APIs without curl in shell script Post 302965681 by balajesuri on Tuesday 2nd of February 2016 03:55:44 AM
Old 02-02-2016
You can try with wget ; but it's quite the hard way.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Use cURL in shell script and get most recent file from remote server using SFTP

I have been trying to implement the following shell script -- sftp to remote server get list of files in the directory sftp get the most recent listed file exit This script will be scheduled to be executed everyday using CRON or CONTROL-M and the need is to have absolutely no human... (7 Replies)
Discussion started by: toobrown1
7 Replies

2. Shell Programming and Scripting

shell script vorher batch mit curl

salve! this in windows command script (batch). i need it for mac....unix or linux @echo off Echo Router reconnect: AVM FRITZ!BOX FON WLAN 7170 curl "http://192.168.10.10:49000/upnp/control/WANIPConn1" -H "Content-Type: text/xml; charset="utf-8"" -H... (1 Reply)
Discussion started by: onkeldave
1 Replies

3. Shell Programming and Scripting

using curl with shell script.

hi please help me out here, i want to use curl command in shell script to test web pages, what i have is an opening page, when i click on a button on opening page, the next page comes up and then i have to upload a file n then click another button to submit and then comes the output... (0 Replies)
Discussion started by: ankushg002
0 Replies

4. Shell Programming and Scripting

CGI shell script curl reponse problem

Hi, I am running a bash shell script for some simple web server CGI, the script runs as expected from the browser except the following: curl --silent --max-time 10 --output /dev/null --write-out %{http_code} http://server:port/filename This line outputs 404 when i execute the script... (0 Replies)
Discussion started by: Moxy
0 Replies

5. Shell Programming and Scripting

curl into a shell script (variable transmission): need help

Hey I'm writting a little shell script, and I started using curl with it today. I would like to login into a website using curl (--data argument). This part is working, curl sent me the webpage that we see when we log in this website. Problem: This is a temporary page. When I log in this... (0 Replies)
Discussion started by: Link_
0 Replies

6. Shell Programming and Scripting

Shell Script for Upload/download files using cURL

hi please help me out here, i want to use curl command in shell script to test web pages, what i have is an opening page, when i click on a button on opening page, the next page comes up and then i have to upload a file n then click another button to submit and then comes the output page,... (2 Replies)
Discussion started by: Olivia
2 Replies

7. Shell Programming and Scripting

perl: CURL REST API Query

I have not used cUrl before, but I have noticed that in my Perl script I give a query and it takes the format: URL?query={field;field} But, when I try this with cUrl, it will not query at all: curl: (3) nested braces not supported at pos 88 I have tried moving the braces etc etc, it... (1 Reply)
Discussion started by: 3246251196
1 Replies

8. Shell Programming and Scripting

Curl/wget shell script to follow redirect.

Hello eveyone. I would like to create a simple batch with curl (or wget) to download a URL but the URL I can only download from the browser and not from shell because curl and wget won't follow the 301 redirect which I get :confused: I tried with curl -L but no luck. I want to hear your opinion.... (5 Replies)
Discussion started by: accolito
5 Replies

9. IP Networking

CurL command Rest API call with oauth 2.0 secutity error

Hi I need to get rates for different security form REST API . the API is oauth 2.0 secured. i need to use curl command to get json response from api . token URL - is HTTP data URL is - HTTPS when trigger my command from bash script it passing and failing intermittently with... (0 Replies)
Discussion started by: shobhit.working
0 Replies

10. Shell Programming and Scripting

Check status of long running multiple curl commands in shell script

I am working on script. it reads a file which contains multiple lines Ex; curl --write-out %{http_code} --silent --output /dev/null http://hostname:port/input=1 curl --write-out %{http_code} --silent --output /dev/null http://hostname:port/input=2 curl --write-out %{http_code} --silent ... (2 Replies)
Discussion started by: oraclermanpt
2 Replies
CURLINFO_HTTP_VERSION(3)				     curl_easy_getinfo options					  CURLINFO_HTTP_VERSION(3)

NAME
CURLINFO_HTTP_VERSION - get the http version used in the connection SYNOPSIS
#include <curl/curl.h> CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_HTTP_VERSION, long *p); DESCRIPTION
Pass a pointer to a long to receive the version used in the last http connection. The returned value will be CURL_HTTP_VERSION_1_0, CURL_HTTP_VERSION_1_1, or CURL_HTTP_VERSION_2_0, or 0 if the version can't be determined. PROTOCOLS
HTTP EXAMPLE
CURL *curl = curl_easy_init(); if(curl) { CURLcode res; curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); res = curl_easy_perform(curl); if(res == CURLE_OK) { long http_version; curl_easy_getinfo(curl, CURLINFO_HTTP_VERSION, &http_version); } curl_easy_cleanup(curl); } AVAILABILITY
Added in 7.50.0 RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. SEE ALSO
CURLINFO_RESPONSE_CODE(3), curl_easy_getinfo(3), curl_easy_setopt(3), libcurl 7.54.0 May 11, 2016 CURLINFO_HTTP_VERSION(3)
All times are GMT -4. The time now is 06:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy