Why am I not getting the same result when I do :
1. Go to my terminal and enter
curl -I www.httpbin.org
Result :
HTTP/1.1 200 OK
Connection: keep-alive
Server: meinheld/0.6.1
Date: Wed, 20 Dec 2017 19:20:56 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 13011
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
X-Powered-By: Flask
X-Processed-Time: 0.00580310821533
Via: 1.1 vegur
2. Create a file APIConnection.sh
Containing :
#! /bin/bash
api_url_1="www.httpbin.org"
echo `curl -I $api_url_1`
Then go to my terminal and execute the file : ./APIConnection.sh
Result :
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 13011 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
Via: 1.1 vegurme: 0.0147929191589 true