score:4

Accepted answer

they are interchangeable, as a technical jargon from the field, "get data from api" and "fetch data from the api" means the same thing.

in javascript, nowadays, we use the fetch api to interact with an api, using http request methods like get, head, post, delete.

unfortunately i don't know a page or repository listing these jargons

score:1

fetch is a javascript api used for making xhr requests across the web (normally for interacting with an api).

let promise = fetch(url, {
  method: "get", // post, put, delete, etc.
  headers: {
    // the content type header value is usually auto-set
    // depending on the request body
    "content-type": "text/plain;charset=utf-8"
  },
  body: undefined // string, formdata, blob, buffersource, or urlsearchparams
  referrer: "about:client", // or "" to send no referer header,
  // or an url from the current origin
  referrerpolicy: "no-referrer-when-downgrade", // no-referrer, origin, same-origin...
  mode: "cors", // same-origin, no-cors
  credentials: "same-origin", // omit, include
  cache: "default", // no-store, reload, no-cache, force-cache, or only-if-cached
  redirect: "follow", // manual, error
  integrity: "", // a hash, like "sha256-abcdef1234567890"
  keepalive: false, // true
  signal: undefined, // abortcontroller to abort request
  window: window // null
});

but get is an http verb. the primary or most-commonly-used http verbs (or methods, as they are properly called) are post, get, put, patch, and delete. these correspond to create, read, update, and delete (or crud) operations, respectively.

to understand more about these methods read architectural styles and the design of network-based software architectures by dr roy fielding or popularly know as roy fielding paper which describes about the restful nature of the web and the use of these http verbs. https://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm


Related Query

More Query from same tag