Where did utils/request and utils/auth go?

System Information
  • Strapi Version: 3.4.6
  • Operating System: macOS Catalina
  • Database: MySQL
  • Node Version: 12.18.2
  • NPM Version: 7.5.2
  • Yarn Version: 1.22.10

Hi there, I’m currently migrating my team’s Strapi setup from 3.0.0-alpha to 3.4.6, and am wondering where utils/request and utils/auth went. Is there a replacement for these? I can’t seem to find them mentioned anywhere in the new documentation or migration info.

Specifically, I want to make authenticated requests to a custom plugin controller from the plugin’s admin panel front end. I’m completely at a loss as to how to do that without request or auth helpers.

I built a custom ‘request’ function that can make unauthenticated requests, but it’s (naturally) getting 403’s when we make queries with it.

Found them!

You can import from strapi-helper-plugin.


import { request } from 'strapi-helper-plugin';

Wish this had have been clearer in the documentation.

1 Like

That package is one on our list to document (I believe we intend to get rid of it at some point but it requires a lot of refactoring).

There was also some talk of getting rid of request and moving to axios

1 Like