79231670

Date: 2024-11-27 19:39:58
Score: 1.5
Natty:
Report link

I like to use the URL API in such cases

const url = new URL('http://myapi.com/orders');

url.searchParams.append('sort', 'date');
url.searchParams.append('order', 'desc');

fetch(url.href);

https://developer.mozilla.org/en-US/docs/Web/API/URL

Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: schaenk