PHPackages                             aaemnnosttv/wp-cli-http-command - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. aaemnnosttv/wp-cli-http-command

ActiveWp-cli-package[HTTP &amp; Networking](/categories/http)

aaemnnosttv/wp-cli-http-command
===============================

WP-CLI command for using the WordPress HTTP API

4371[2 issues](https://github.com/aaemnnosttv/wp-cli-http-command/issues)PHP

Since Oct 20Pushed 6y ago1 watchersCompare

[ Source](https://github.com/aaemnnosttv/wp-cli-http-command)[ Packagist](https://packagist.org/packages/aaemnnosttv/wp-cli-http-command)[ RSS](/packages/aaemnnosttv-wp-cli-http-command/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

WP-CLI HTTP Command
===================

[](#wp-cli-http-command)

```
NAME

  wp http

DESCRIPTION

  Perform an HTTP request using the WP HTTP API

SYNOPSIS

  wp http

SUBCOMMANDS

  get       Perform a GET request to the given URI
  head      Perform a HEAD request to the given URI
  post      Perform a POST request to the given URI

```

Subcommands
-----------

[](#subcommands)

Each subcommand matches to the HTTP method you wish to perform, and they all accept just 1 required parameter, the ``.

#### ``

[](#uri)

The URI can be either a full URL, or just the request URI (requires `realm` option)

Options
-------

[](#options)

#### Realm

[](#realm)

```
--realm=

```

The realm option restricts the request to the current site, and refers to which area of the site the request URI is relative to.

To perform a GET request on the home page of the site:

```
wp http get / --realm=home

```

or, to perform a GET request on the Plugins page of wp-admin:

```
wp http get plugins.php --realm=admin

```

> Since admin requests require authentication, we need to specify which user the request *should be performed as*.

#### Authentecated User

[](#authentecated-user)

```
--as=

```

When making any request to an admin realm, (unless you're specifically testing that the request is being redirected to the login page) you will want to specify which user the request should be made as. This is as simple as providing the user ID, username, or email.

Load the admin Dashboard

```
wp http get / --realm=admin --as=1

```

#### Scheme

[](#scheme)

```
--scheme=

```

Force a particular scheme on the request URL.

Flags
-----

[](#flags)

`--status`
When set, only the HTTP status code and message are output. If the response is a 3xx, the location header is included as well.

`--ssl-verify` `--no-ssl-verify`
Whether or not SSL certificates should be checked against WordPress' bundled certificates. Good for working around self-signed certificates. Default: `on`

Installation
============

[](#installation)

Due to the nature of this command, it cannot be installed as a plugin and thus would not be useful to install as a project dependency. Instead, the HTTP Command is installed as a Composer package, and loaded by the local user's wp-cli config.

Create the wp-cli user directory, if it doesn't already exist

```
mkdir ~/.wp-cli && cd ~/.wp-cli

```

Require the http command package

```
composer require --prefer-dist aaemnnosttv/wp-cli-http-command:"^0.1"

```

Create the wp-cli config file, if it doesn't exist yet

```
touch config.yml

```

Load composer. Edit the `config.yml` file and make sure `vendor/autoload.php` is being loaded under `require` like so

```
require:
  - vendor/autoload.php

```

That's it! Now you should see the `http` command as an option when you run `wp` from any directory.

##### Inspiration

[](#inspiration)

- [jkbrzt/httpie](https://github.com/jkbrzt/httpie)

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/b443f89936449a1c048fcc223ea03b285a4e9c9667ffd21c0c4b3f33e46f72c9?d=identicon)[aaemnnosttv](/maintainers/aaemnnosttv)

---

Top Contributors

[![aaemnnosttv](https://avatars.githubusercontent.com/u/1621608?v=4)](https://github.com/aaemnnosttv "aaemnnosttv (26 commits)")[![danielbachhuber](https://avatars.githubusercontent.com/u/36432?v=4)](https://github.com/danielbachhuber "danielbachhuber (1 commits)")

### Embed Badge

![Health badge](/badges/aaemnnosttv-wp-cli-http-command/health.svg)

```
[![Health](https://phpackages.com/badges/aaemnnosttv-wp-cli-http-command/health.svg)](https://phpackages.com/packages/aaemnnosttv-wp-cli-http-command)
```

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[nyholm/psr7

A fast PHP7 implementation of PSR-7

1.3k235.4M2.4k](/packages/nyholm-psr7)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M293](/packages/pusher-pusher-php-server)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78126.4M414](/packages/react-http)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
