Next.js Discord

Discord Forum

Making a request from frontend

Unanswered
Basset Bleu de Gascogne posted this in #help-forum
Open in Discord
Basset Bleu de GascogneOP
var options = {
 "method": "GET",
 "url": "https://api.minaexplorer.com/accounts/{public_key}",
 "headers": {},
 "body": "{}"
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
this is the backend code however I want to make requets to the above url from the client side whats the best way in nextjs

0 Replies