{"id":15501205,"url":"https://github.com/aaemnnosttv/wp-cli-http-command","last_synced_at":"2025-04-22T23:03:33.530Z","repository":{"id":56938950,"uuid":"50810698","full_name":"aaemnnosttv/wp-cli-http-command","owner":"aaemnnosttv","description":"WP-CLI command for using the WordPress HTTP API","archived":false,"fork":false,"pushed_at":"2020-01-02T16:02:50.000Z","size":53,"stargazers_count":4,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-22T00:04:58.707Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aaemnnosttv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-02-01T03:16:13.000Z","updated_at":"2021-01-23T22:31:08.000Z","dependencies_parsed_at":"2022-08-21T01:40:15.981Z","dependency_job_id":null,"html_url":"https://github.com/aaemnnosttv/wp-cli-http-command","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaemnnosttv%2Fwp-cli-http-command","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaemnnosttv%2Fwp-cli-http-command/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaemnnosttv%2Fwp-cli-http-command/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaemnnosttv%2Fwp-cli-http-command/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aaemnnosttv","download_url":"https://codeload.github.com/aaemnnosttv/wp-cli-http-command/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250337907,"owners_count":21414104,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-02T09:03:04.641Z","updated_at":"2025-04-22T23:03:33.511Z","avatar_url":"https://github.com/aaemnnosttv.png","language":"PHP","readme":"WP-CLI HTTP Command\n=====================\n\n```\nNAME\n\n  wp http\n\nDESCRIPTION\n\n  Perform an HTTP request using the WP HTTP API\n\nSYNOPSIS\n\n  wp http \u003ccommand\u003e\n\nSUBCOMMANDS\n\n  get       Perform a GET request to the given URI\n  head      Perform a HEAD request to the given URI\n  post      Perform a POST request to the given URI\n```\n\n## Subcommands\nEach subcommand matches to the HTTP method you wish to perform, and they all accept just 1 required parameter, the `\u003curi\u003e`.\n\n#### `\u003curi\u003e`\nThe URI can be either a full URL, or just the request URI (requires `realm` option)\n\n## Options\n\n#### Realm\n```\n--realm=\u003chome|admin\u003e\n```\nThe realm option restricts the request to the current site, and refers to which area of the site the request URI is relative to.\n\nTo perform a GET request on the home page of the site:\n```\nwp http get / --realm=home\n```\nor, to perform a GET request on the Plugins page of wp-admin:\n```\nwp http get plugins.php --realm=admin\n```\n\u003e Since admin requests require authentication, we need to specify which user the request _should be performed as_.\n\n#### Authentecated User\n```\n--as=\u003cuser\u003e\n```\nWhen 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.\n\nLoad the admin Dashboard\n```\nwp http get / --realm=admin --as=1\n```\n\n#### Scheme\n```\n--scheme=\u003chttp|https\u003e\n```\nForce a particular scheme on the request URL.\n\n## Flags\n`--status`  \nWhen set, only the HTTP status code and message are output.  If the response is a 3xx, the location header is included as well.\n\n`--ssl-verify` `--no-ssl-verify`  \nWhether or not SSL certificates should be checked against WordPress' bundled certificates.  Good for working around self-signed certificates.\nDefault: `on`\n\n# Installation\nDue 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.\n\n \nCreate the wp-cli user directory, if it doesn't already exist\n```\nmkdir ~/.wp-cli \u0026\u0026 cd ~/.wp-cli\n```\nRequire the http command package\n```\ncomposer require --prefer-dist aaemnnosttv/wp-cli-http-command:\"^0.1\"\n```\nCreate the wp-cli config file, if it doesn't exist yet\n```\ntouch config.yml\n```\nLoad composer.  Edit the `config.yml` file and make sure `vendor/autoload.php` is being loaded under `require` like so\n```\nrequire:\n  - vendor/autoload.php\n```\n\nThat's it!  Now you should see the `http` command as an option when you run `wp` from any directory.\n\n\n##### Inspiration\n- [jkbrzt/httpie](https://github.com/jkbrzt/httpie)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaemnnosttv%2Fwp-cli-http-command","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faaemnnosttv%2Fwp-cli-http-command","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaemnnosttv%2Fwp-cli-http-command/lists"}