mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	Use fetch helpers instead of fetch (#27026)
WIP because: - [x] Some calls set a `content-type` but send no body, can likely remove the header - [x] Need to check whether `charset=utf-8` has any significance on the webauthn calls, I assume not as it is the default for json content. - [x] Maybe `no-restricted-globals` is better for eslint, but will require a lot of duplication in the yaml or moving eslint config to a `.js` extension. - [x] Maybe export `request` as `fetch`, shadowing the global.
This commit is contained in:
		| @@ -95,7 +95,7 @@ Some lint rules and IDEs also have warnings if the returned Promise is not handl | ||||
| ### Fetching data | ||||
|  | ||||
| To fetch data, use the wrapper functions `GET`, `POST` etc. from `modules/fetch.js`. They | ||||
| accept a `data` option for the content, will automatically set CSFR token and return a | ||||
| accept a `data` option for the content, will automatically set CSRF token and return a | ||||
| Promise for a [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response). | ||||
|  | ||||
| ### HTML Attributes and `dataset` | ||||
|   | ||||
		Reference in New Issue
	
	Block a user