Http client с linux

Лучшие HTTP-клиенты командной строки для Linux

HTTP-клиенты – это служебное программное обеспечение, позволяющее загружать файлы через Интернет . Помимо возможности удаленной загрузки файлов, эти инструменты командной строки можно использовать для других задач, таких как отладка и взаимодействие с веб-серверами.

Сегодня мы составили список лучших HTTP-клиентов, созданных для использования в командной строке Linux.

1. HTTPie

HTTPie – это HTTP-клиент с открытым исходным кодом для взаимодействия с HTTP-серверами, веб-службами и API-интерфейсами RESTful. HTTPie произносится как «aych-tee-tee-pie», и его цель – упростить взаимодействие человека с веб-сервисами через командную строку, поэтому большинство людей используют его для Wget-подобных загрузок .

Другие его функции включают цветовой синтаксис на основе типов, настраиваемые заголовки, постоянные сеансы, поддержку плагинов, встроенную поддержку JSON и т. Д.

Лучшие HTTP-клиенты командной строки для Linux

2. HTTP Prompt 2

HTTP Prompt – это интерактивный HTTP-клиент командной строки, созданный на основе prompt_toolkit и HTTPie с более чем 20 темами. Его основные функции включают в себя автоматическое заполнение, подсветку синтаксиса, автоматические куки, Unix-подобные конвейеры, совместимость с HTTpie, http-подсказка сохраняется между сеансами и интеграцию OpenAPI / Swagger.

Лучшие HTTP-клиенты командной строки для Linux

3. Curl

Curl – это утилита и библиотека командной строки с открытым исходным кодом для передачи файлов по сети с использованием синтаксиса URL по любому из нескольких поддерживаемых протоколов, включая SCP, SMTPS, HTTPS, IMAP, LDAP, POP3 и т. Д.

Curl – очень популярная утилита, используемая не только в терминалах и скриптах для передачи данных, но также в маршрутизаторах, принтерах, планшетах, мобильных телефонах, телевизионных приставках, аудиоаппаратуре, медиаплеерах и т. Д. Она имеет длинный список функций, который включает поддержку для IPv6 и socks5, пользовательские результаты вывода после завершения, без ограничения длины URL, асинхронное разрешение имен.

Лучшие HTTP-клиенты командной строки для Linux

4. Wget

Wget – это утилита командной строки с открытым исходным кодом для извлечения контента с веб-серверов через прокси-серверы HTTP, а также протоколы HTTP, HTTPS и FTP. Его функция – рекурсивная загрузка, которая подразумевает, что он следует по ссылкам на HTML-страницах и создает локальные версии удаленных веб-сайтов.

Wget может похвастаться несколькими функциями, включая способность превосходно функционировать даже при медленном или нестабильном сетевом подключении, поддержку прокси-серверов HTTP и файлов cookie, возобновление прерванных загрузок с использованием API REST и RANGE, файлы сообщений на основе NLS для разных языков и т. Д.

Лучшие HTTP-клиенты командной строки для Linux

5. Aria2

Aria2 – это легкая утилита загрузки с открытым исходным кодом для командной строки с поддержкой HTTP и HTTPS, FTP и SFTP, Metalink и BitTorrent. Его функции включают в себя автоматическую проверку для таких файлов, как BitTorrent , параллельные загрузки файлов с HTTP (S)/(S) FTP и BitTorrent одновременно, поддержку Ntrc, кэширование диска для снижения активности диска, поддержку IPv6 с Happy Eyeballs и т. Д.

Читайте также:  Linux python site packages path

Есть ли какие-нибудь классные HTTP-клиенты командной строки, которые не перечислены выше? Не стесняйтесь добавлять свои варианты в комментарии.

Источник

Best Command Line HTTP Client for Linux

In this tutorial, we will explore some of the most commonly used and famous HTTP clients that are present in Linux. A HTTP Client is a software that is mainly used to allow us to download files from the Internet. The primary reason for using HTTP clients is generally to download files, but these can also be used in case we want to debug or interact with a web server or multiple web servers.

Now, let’s consider the most famous HTTP Clients that are used.

HTTPie

With the name that almost resembles of the famous web protocol (i.e., HTTP), HTTPie, is command line HTTP Client that helps us when it comes to interacting with web services, and RESTful APIs. It is said that it provides a much simpler interface that is very user friendly and easy to use even for someone who hasn’t used it before.

With being a simple and easy to use client, it also provides custom headers, plugin support, JSON built-in support and colorized syntax as well and much more.

In case we want to make use of HTTPie client, the first step is to install the same on our local machine.

How to Install HTTPie?

Consider the command shown below. If you are using a Debian/Ubuntu distribution, then you can use the following command to install HTTPie.

If you are using a CentOS/RHEL distribution, then you can make use of the command shown below to install HTTPie.

Once you have installed the HTTPie client, you can use it with the following syntax

http [options] [method] URL [ITEM]

HTTP Prompt

HTTP Prompt is command line HTTP Client that is built on top of prompt_toolkit and HTTPie that introduces more than 20+ themes. It has many features like auto-complete, syntax highlighting, http-prompt persists in-between the different sessions, auto cookies and much more.

In case you want to use the HTTP Prompt client, the first step is to install the same on your local machine.

Consider the command shown below. If you are using a Debian/Ubuntu distribution, then you can use the following command to install HTTP Prompt.

sudo pip install http-prompt

Once you have installed the HTTP Prompt client, you can use it with the following syntax

In case you need to update the version of HTTP Prompt, use the following command −

Curl

Curl is also a common line utility like the two http clients mentioned above and is mainly used when we want to transfer files over a network using a URL. It supports different protocols, like HTTPS, IMAP, LDAP, POP3 etc.

Читайте также:  Linux дата время файла

It is a very popular utility that is mainly used not only in terminals but also when it comes to tablets, mobile phones, audio equipment, and much more.

For example, you can use the following curl command to check its version.

It will produce the following output

curl 7.77.0 (x86_64-pc-linux-gnu) libcurl/7.77.0 (SecureTransport) LibreSSL/2.8.3 zlib/1.2.11 nghttp2/1.42.0 Release-Date: 2021-05-26 Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp Features: alt-svc AsynchDNS GSS-API HSTS HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz MultiSSL NTLM NTLM_WB SPNEGO SSL UnixSockets

Wget

Wget is a Linux command line utility that is used to retrieve files from World Wide Web(WWW) and makes use of protocols like HTTPS and FTP. It is a freely available package and can be downloaded and installed on any Linux supporting architecture.

One of the key features of wget is its ability to automatically start downloading where it was left off in case there is a network issue. It should also be noted that it deletes files recursively and it will keep trying to download all the files until it has been retrieved completely.

How to Install Wget

If you are using an Ubuntu/Fedora distribution, then use the following command −

If you are on Mac OS X, then use the following command −

Now, let’s take an example. You can use the following wget command to download a file from a URL:

It will produce the following output

immukul@192 linux-code % wget http://ftp.gnu.org/gnu/wget/wget-1.5.3.tar.gz --2021-07-11 12:12:20-- http://ftp.gnu.org/gnu/wget/wget-1.5.3.tar.gz Resolving ftp.gnu.org (ftp.gnu.org). 209.51.188.20 Connecting to ftp.gnu.org (ftp.gnu.org)|209.51.188.20|:80. connected. HTTP request sent, awaiting response. 200 OK Length: 446966 (436K) [application/x-gzip] Saving to: 'wget-1.5.3.tar.gz' wget-1.5.3.tar.gz 100%[========================================================>] 436.49K 285KB/s in 1.5s 2021-07-11 12:12:23 (285 KB/s) - 'wget-1.5.3.tar.gz' saved [446966/446966]

Aria2

Aria2 is another command line utility that supports different protocols that allows us to transfer files over the internet. It has many features, like parallel downloading of files, automatic validation for files, IPv6 support and much more.

In case you want to use an Aria2 client, you have to first install it on your local machine.

How to Install Aria2?

If you are using a Debian/Ubuntu distribution, then use the following command to install Aria2 −

On the other hand, if you are using a CentOS/RHEL distribution, then you can use the following command −

You can use the following syntax when working with Aria2 −

Conclusion

In this tutorial, we explored different examples of the most commonly used HTTP clients that are available for Linux today.

Читайте также:  Linux distro debian based

Источник

Best Command Line HTTP Clients for Linux

HTTP clients are utility software that enables you to download files over the Internet. Apart from being able to download files remotely, these command line tools can be used for other tasks such as debugging and interacting with web servers.

Today, check out our list of the best HTTP clients created for use in the Linux Command Line.

1. HTTPie

HTTPie is an open source command line HTTP client for interacting with HTTP servers, web services, and RESTful APIs. HTTPie pronounced “aych-tee-tee-pie” and its aim is to simplify human interaction with web services via the command line, so most people use it for Wget-like downloads.

Its other features include a type-based colorized syntax, custom headers, persistent sessions, support for plugins, built-in support for JSON, etc.

HTTPie Linux HTTP Client

2. HTTP Prompt 2

HTTP Prompt is an interactive command-line HTTP client built on prompt_toolkit and HTTPie with 20+ themes. Its feature highlights include auto-complete, syntax highlighting, auto cookies, Unix-like pipelines, compatibility with HTTpie, http-prompt persists in-between sessions, and OpenAPI/Swagger integration.

HTTP Prompt - Command Line HTTP Client for Linux

3. Curl

Curl is an open source command line utility and library for transferring files over a network using URL syntax over any of several supported protocols including SCP, SMTPS, HTTPS, IMAP, LDAP, POP3, etc.

Curl is a very popular utility used in not only terminals and scripts to transfer data but also in routers, printers, tablets, mobile phones, set-top boxes, audio equipment, media players, etc. It has a long feature list which includes support for IPv6 and socks5, custom output results after completion, no URL length limit, asynchronous name resolving.

Curl Query HTTP Headers

4. Wget

Wget is an open source command-line utility for retrieving content from web servers via HTTP proxies as well as HTTP, HTTPS, and FTP protocols. Its function is recursive downloading which entails that it follows the links in HTML pages and create local versions of remote websites.

Wget boasts several features including the ability to function excellently even when your network connection is slow or unstable, support for HTTP proxies and cookies, resume aborted downloads using REST and RANGE APIs, NLS-based message files for different languages, etc.

Wget Download Files to Specific Directory

5. Aria2

Aria2 is a lightweight open source command-line download utility with support for HTTP & HTTPS, FTP & SFTP, Metalink, and BitTorrent. Its features include automatic validation for files like BitTorrent, parallel file downloads from HTTP(S)/(S)FTP and BitTorrent at the same, Ntrc support, disk caching to reduce disk activity, IPv6 support with Happy Eyeballs, etc.

Are there any awesome command line HTTP clients that are not listed above? Feel free to add your suggestions and reasons in the discussion box below.

Источник

Оцените статью
Adblock
detector