I would like to determine how long the short url is. I tried using HTTP HEAD requests, but very few of the returned header fields actually contain any data related to the destination / long URL.
Is there: 1. Any way to define a long URL? 2. If yes, can this be done without loading the body of the addressee?
thank
Make HEADand find the title Location.
HEAD
Location
% telnet bit.ly 80 Trying 168.143.173.13... Connected to bit.ly. Escape character is '^]'. HEAD /cwz5Jd HTTP/1.1 Host: bit.ly HTTP/1.1 301 Moved Server: nginx/0.7.42 Date: Fri, 12 Mar 2010 18:37:46 GMT Content-Type: text/html; charset=utf-8 Connection: keep-alive Set-Cookie: _bit=4b9a89fa-002bd-030af-baa08fa8;domain=.bit.ly;expires=Wed Sep 8 14:37:46 2010;path=/; HttpOnly Location: http://www.engadget.com/2010/03/12/motorola-milestone-with-android-2-1-hitting-bulgaria-by-march-20/?utm_source=twitterfeed&utm_medium=twitter MIME-Version: 1.0 Content-Length: 404
HTTP GET, , Location. , .
, Cocoa , didReceiveResponse . . URL- , [cancel] .
EDIT: , HEAD GET . , , GET.
LongUrlPlease API, URL-.
Source: https://habr.com/ru/post/1736705/More articles:Why is OracleDataAdapter.Fill () so slow? - sqlWhat is the best python or bash for selectively concatenating a large number of files? - pythonHow can I convert an integer to 'binary' in python - pythonhow to change int to binary. on python 2.5 - pythonSearch and Match Algorithm - algorithmWhat is the most efficient way to load data from a file into a collection on demand? - javaPHPExcel Function Question - phpНевозможно загрузить DropDownList в FormView из кода? - .netForce Json Serializer to create a specific date and time format (yyyy-mm-ddTh: mm: s .msmsmsZ) - jsonData Algorithm - algorithmAll Articles