UNPKG

rest-api-handler

Version:
23 lines (18 loc) 538 B
/** * @desc Types of formats of data you can send through body of Fetch request. */ /** * @desc Json is object converted to string. It is default format in a library. */ const JSON = 'json'; /** * @desc Form Data can be used to send images. * @see https://developer.mozilla.org/en-US/docs/Web/API/FormData */ const FORM_DATA = 'formdata'; /** * @desc Url encoded data in body * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST */ const URL_ENCODED = 'urlencoded'; export { FORM_DATA, JSON, URL_ENCODED };