PHPackages                             lukeyouell/craft-fetch - 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. lukeyouell/craft-fetch

AbandonedCraft-plugin[HTTP &amp; Networking](/categories/http)

lukeyouell/craft-fetch
======================

Utilise the Guzzle HTTP client from within your Craft templates.

1.3.0(6y ago)2411.6k12[4 issues](https://github.com/lukeyouell/craft-fetch/issues)[3 PRs](https://github.com/lukeyouell/craft-fetch/pulls)MITPHP

Since Jan 15Pushed 3y ago1 watchersCompare

[ Source](https://github.com/lukeyouell/craft-fetch)[ Packagist](https://packagist.org/packages/lukeyouell/craft-fetch)[ Fund](https://www.paypal.me/jalenconner)[ GitHub Sponsors](https://github.com/jalendport)[ RSS](/packages/lukeyouell-craft-fetch/feed)WikiDiscussions develop Synced today

READMEChangelog (8)Dependencies (1)Versions (13)Used By (0)

[![icon](src/icon.svg)](src/icon.svg)

Fetch plugin for Craft CMS 3.x
==============================

[](#fetch-plugin-for-craft-cms-3x)

Utilise the Guzzle HTTP client from within your Craft templates.

Requirements
------------

[](#requirements)

This plugin requires Craft CMS 3.0.0 or later.

Installation
------------

[](#installation)

To install the plugin, follow these instructions.

1. Open your terminal and go to your Craft project:

    ```
     cd /path/to/project

    ```
2. Then tell Composer to load the plugin:

    ```
     composer require jalendport/craft-fetch

    ```
3. In the Control Panel, go to Settings → Plugins and click the “Install” button for Fetch.

Using Fetch
-----------

[](#using-fetch)

This plugin is built to work with the standard [Guzzle request options](http://docs.guzzlephp.org/en/stable/request-options.html)

### Parameters

[](#parameters)

ParameterExample value`client``{ base_uri : 'https://gtmetrix.com', timeout : 10 } ``method``'POST'``destination``'api/0.1/test'``options``{ auth : ['username', 'password'] }`### Example Usage

[](#example-usage)

#### Request

[](#request)

```
{% set client = {
    base_uri : 'https://gtmetrix.com',
    timeout : 10
} %}

{% set options = {
    auth : ['username', 'password'],
    form_params : {
      url : 'https://www.google.co.uk'
    }
} %}

{% set request = fetch(client, 'POST', 'api/0.1/test', options) %}
```

#### Response (successful)

[](#response-successful)

```
{
   "statusCode":200,
   "reason":"OK",
   "body": {
      "credits_left":30,
      "test_id":"JDHFbrt7",
      "poll_state_url":"https:\/\/gtmetrix.com\/api\/0.1\/test\/JDHFbrt7"
   }
}
```

You can fetch the string response by adding an additional parameter of `false` like so:

```
{% set request = fetch(client, 'POST', 'api/0.1/test', options, false) %}
```

#### Response (error)

[](#response-error)

```
{
   "error":true,
   "reason":"Client error: `POST https:\/\/gtmetrix.com\/api\/0.1\/test` resulted in a `401 Authorization Required` response:\n{\u0022error\u0022:\u0022Invalid e-mail and\/or API key\u0022}\n\n"
}
```

Fetch Roadmap
-------------

[](#fetch-roadmap)

Some things to do, and ideas for potential features:

Brought to you by [Luke Youell](https://github.com/lukeyouell)

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 81.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.

###  Release Activity

Cadence

Every ~218 days

Recently: every ~470 days

Total

10

Last Release

1121d ago

Major Versions

1.3.0 → 2.0.0-beta.12023-06-08

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/24975058?v=4)[Luke](/maintainers/lukeyouell)[@lukeyouell](https://github.com/lukeyouell)

---

Top Contributors

[![lukeyouell](https://avatars.githubusercontent.com/u/24975058?v=4)](https://github.com/lukeyouell "lukeyouell (26 commits)")[![jalendport](https://avatars.githubusercontent.com/u/6537823?v=4)](https://github.com/jalendport "jalendport (5 commits)")[![jhagel](https://avatars.githubusercontent.com/u/11066431?v=4)](https://github.com/jhagel "jhagel (1 commits)")

---

Tags

GuzzlecmsCraftcraftcmscraft-pluginfetch

### Embed Badge

![Health badge](/badges/lukeyouell-craft-fetch/health.svg)

```
[![Health](https://phpackages.com/badges/lukeyouell-craft-fetch/health.svg)](https://phpackages.com/packages/lukeyouell-craft-fetch)
```

###  Alternatives

[jalendport/craft-fetch

Utilise the Guzzle HTTP client from within your Craft templates.

2327.8k1](/packages/jalendport-craft-fetch)[verbb/formie

The most user-friendly forms plugin for Craft.

102393.6k70](/packages/verbb-formie)[verbb/vizy

A flexible visual editor field for Craft.

4250.4k](/packages/verbb-vizy)[verbb/hyper

A user-friendly links field for Craft.

24147.8k12](/packages/verbb-hyper)[verbb/postie

Get shipping rates, tracking status and print labels with Australia Post, UPS, USPS, FedEx, DHL Express, and more.

1219.3k](/packages/verbb-postie)[verbb/social-poster

Automatically post entries to social media.

918.5k](/packages/verbb-social-poster)

PHPackages © 2026

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