03-23-2019
Your question makes no sense.
The web uses HTTP as a universal protocol for client-server web transactions.
The server and the client are independent objects/ entities that can exchange data because of HTTP. Javascript or not, curl or not, wget or not? These topics are an independent and mostly unrelated issue.
That is why there are communication protocols, to decouple the application and underlying programming language from the client-server comms. In this case:
Hypertext Transfer Protoco (HTTP)
So, it should not matter if talking "shoestring" to "elephant ear" as long as both the client and the server adhere to the same HTTP protocol standard(s).
Anyway, underlying most Javascript implements like node.js (on the server side) is C++ and the same is true of wget, curl, etc. At the core of most of all this is C++ (not that it matters).
Regardless of the programming language, HTTP-based client-server applications can communicate (exchange data) because they follow the same set of communication protocol standards.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
We are trying to invoke a https service from our unix script using curl command. The service is not getting invoked because it is SSL configured. Bypassing certification (using curl –k) does not work.
curl -k https://site
curl -k -x IP:Port https://site
curl -k -x IP:443 https://id:pwd@site
... (0 Replies)
Discussion started by: dineshbabu01
0 Replies
2. Shell Programming and Scripting
I need a proxy that would enable me to use cli curl/wget with another ip address.
How do I find a paid proxy server that supports curl/wget? (1 Reply)
Discussion started by: locoroco
1 Replies
3. Shell Programming and Scripting
I'm using a proxy service with an ip address and a port number.
How do I use the proxy with wget or cli curl? (1 Reply)
Discussion started by: locoroco
1 Replies
4. Shell Programming and Scripting
Hello,
I am wondering does anyone know of a method using curl/wget or other where by I could specify the IP address of the server I wish to query for a website.
Something similar to editing /etc/hosts but that can be done directly from the command line. I have looked through the man pages... (4 Replies)
Discussion started by: colinireland
4 Replies
5. Shell Programming and Scripting
Hi
I need a Shell script that will download a zip file every second from a http server but i can't use neither curl nor wget.
Can anyone will help me go about this task ???
Thanks!! (1 Reply)
Discussion started by: rubber08
1 Replies
6. Shell Programming and Scripting
i use curl and wget quite often.
i set up alarms on their output. for instance, i would run a "wget" on a url and then search for certain strings within the output given by the "wget".
the problem is, i cant get the entire output or response of my wget/curl command to show up correctly in... (3 Replies)
Discussion started by: SkySmart
3 Replies
7. Shell Programming and Scripting
Hi,
My script needs to crawl the data from a third party site. Currently it is written in wget. The third party site is of shared interface with different IP addresses.
My wget works with all the IP address but not with one. Whereas the curl is able to hit that IP address and comes out... (2 Replies)
Discussion started by: sathyaonnuix
2 Replies
8. Shell Programming and Scripting
Experts,
I login to a 3rd party and pull some valuable information with my credentials. I pass my credentials via --post-data in wget.
Now my Account is locked. I want my wget to alert that the Account is locked. How can i achieve this.
My idea is, get the Source page html from the... (2 Replies)
Discussion started by: sathyaonnuix
2 Replies
9. Shell Programming and Scripting
Hello,
What I am trying to do is to get html data of a website automatically.
Firstly I decided to do it manually and via terminal I entered below code:
$ wget http://www.***.*** -q -O code.html
Unfortunately code.html file was empty.
When I enter below code it gave Error 303-304
$... (1 Reply)
Discussion started by: baris35
1 Replies
10. Shell Programming and Scripting
i'm using this command to post data to a remote host:
wget --post-data="My Data" http://<my-ip>:80 -O /dev/null -q
and
curl --data "My Data" http://<my-ip>:80
however, when i run the above, i see the following in my access log on the remote host:
Wget:
10.10.10.10 - - "POST /... (1 Reply)
Discussion started by: SkySmart
1 Replies
LEARN ABOUT MOJAVE
curlopt_followlocation
CURLOPT_FOLLOWLOCATION(3) curl_easy_setopt options CURLOPT_FOLLOWLOCATION(3)
NAME
CURLOPT_FOLLOWLOCATION - follow HTTP 3xx redirects
SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FOLLOWLOCATION, long enable);
DESCRIPTION
A long parameter set to 1 tells the library to follow any Location: header that the server sends as part of a HTTP header in a 3xx
response. The Location: header can specify a relative or an absolute URL to follow.
libcurl will issue another request for the new URL and follow new Location: headers all the way until no more such headers are returned.
CURLOPT_MAXREDIRS(3) can be used to limit the number of redirects libcurl will follow.
libcurl limits what protocols it automatically follows to. The accepted protocols are set with CURLOPT_REDIR_PROTOCOLS(3). By default
libcurl will allow all protocols on redirect except those disabled for security reasons: Since 7.19.4 FILE and SCP are disabled, and since
7.40.0 SMB and SMBS are also disabled.
When following a Location:, the 3xx response code that redirected it also dictates which request method it will use in the subsequent
request: For 301, 302 and 303 responses libcurl will switch method to GET unless CURLOPT_POSTREDIR(3) instructs libcurl otherwise. All
other 3xx codes will make libcurl send the same method again.
For users who think the existing location following is too naive, too simple or just lacks features, it is very easy to instead implement
your own redirect follow logic with the use of curl_easy_getinfo(3)'s CURLINFO_REDIRECT_URL(3) option instead of using CURLOPT_FOLLOWLOCA-
TION(3).
DEFAULT
0, disabled
PROTOCOLS
HTTP(S)
EXAMPLE
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
/* example.com is redirected, so we tell libcurl to follow redirection */
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_perform(curl);
}
AVAILABILITY
Along with HTTP
RETURN VALUE
Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not.
SEE ALSO
CURLOPT_REDIR_PROTOCOLS(3), CURLOPT_PROTOCOLS(3), CURLOPT_POSTREDIR(3), CURLINFO_REDIRECT_URL(3), ,CURLINFO_REDIRECT_COUNT(3),
libcurl 7.54.0 February 03, 2016 CURLOPT_FOLLOWLOCATION(3)