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[3 PRs](https://github.com/lukeyouell/craft-fetch/pulls)MITPHP

Since Jan 15Pushed 2y 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 1mo ago

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

38

—

LowBetter than 84% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity34

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

1065d ago

Major Versions

1.3.0 → 2.0.0-beta.12023-06-08

### Community

Maintainers

![](https://www.gravatar.com/avatar/1fbc5aac79249c9e0a365480ed8dfa44090d825068482f7199ce767a1ad3dfc2?d=identicon)[lukeyouell](/maintainers/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.6k1](/packages/jalendport-craft-fetch)[nystudio107/craft-seomatic

SEOmatic facilitates modern SEO best practices &amp; implementation for Craft CMS 5. It is a turnkey SEO system that is comprehensive, powerful, and flexible.

1741.4M46](/packages/nystudio107-craft-seomatic)[verbb/image-resizer

Resize assets when they are uploaded.

127269.1k7](/packages/verbb-image-resizer)[verbb/tablemaker

Create customizable and user-defined table fields.

40168.8k1](/packages/verbb-tablemaker)[acclaro/translations

Easily launch and manage multilingual Craft websites without having to copy/paste content or manually track updates.

1229.5k](/packages/acclaro-translations)[verbb/footnotes

Adds a footnotes feature to CKEditor fields and Twig templates.

213.3k](/packages/verbb-footnotes)

PHPackages © 2026

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