1

I am using a combination of two Craft 2 plugins, Cookies and Rest to get the logged in status of a user. What is the recommended way of doing this in Craft 3?

{% set userReq =
  craft.rest.request
    .headers({
      Cookie: cookie
    })
    .url("https://api2.lumi.com/auth/current")
    .send()
%}
0

You can use the Fetch plugin to make HTTP requests from a template in Craft 3 and there's a Cookies plugin for reading and writing cookies via a template that should do what you want.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.