Last update at :2024-05-16,Edit by888u
I remember that Git.io should have recorded the method of customizing short links, but I couldn’t find it after searching. Could it be that there is a memory bias? Then let’s sort out how to customize short links in Git.io. Git.io is a short URL service provided by GitHub. It can be used to shorten GitHub links. Sometimes it is very useful. The default use is to return a random short link, but we can send a request through the command line to implement the custom short link function.
1. Git.io short URL generation method
The method of use is very simple, just visit the following URL to use:
https://git.io/
2. Git.io custom short URL method
The method for Git.io to customize the short URL is very simple. Just use the terminal to run the following command:
curl -i https://git.io -F "url=YOURURL" -F "code=CUSTOMIZEDURL"
Change YOURURL
to the link you want to shorten, and CUSTOMIZEDURL
to the short link you want to generate, for example:
curl -i https://git.io -F "url=https://raw.githubusercontent.com/zq/superspeed/master/superspeed.sh" -F "code=superspeed. sh"
The returned results are as follows:
HTTP/1.1 201 Created Server:Cowboy Connection: keep-alive Date: Fri, 30 Jul 2021 19:03:06 GMT Status: 201 Created Content-Type: text/html;charset=utf-8 Location: https://git.io/superspeed.sh Content-Length: 68 X-Xss-Protection: 1; mode=block X-Content-Type-Options: nosniff X-Frame-Options: SAMEORIGIN X-Runtime: 0.009030 X-Node: 8a07087a-1226-4b47-ad30-b16cfb42da57 X-Revision: 392798d237fc1aa5cd55cada10d2945773e741a8 Strict-Transport-Security: max-age=31536000; includeSubDomains Via: 1.1 vegur
You can see that one parameter is Location, which is the short link after generation. Here is https://git.io/superspeed.sh
.
The above is how Git.io customizes short URLs.
Recommended site searches: query IP, Korean high defense server, buy high defense server, US server rental, multi-IP station group server, IP proxy free version 2.80, how to rent foreign server, registered domain name query, legendary server rental price list , US free hosting,
发表评论