mirror of
				https://git.sr.ht/~cadence/bibliogram
				synced 2025-10-30 19:15:37 +00:00 
			
		
		
		
	Rename folder to request_backends
This commit is contained in:
		
							parent
							
								
									ee2626924a
								
							
						
					
					
						commit
						6fd9907b60
					
				| @ -1,5 +1,5 @@ | |||||||
| const NodeFetch = require("./requestbackends/node-fetch") | const NodeFetch = require("./request_backends/node-fetch") | ||||||
| const Got = require("./requestbackends/got") | const Got = require("./request_backends/got") | ||||||
| 
 | 
 | ||||||
| const constants = require("../constants") | const constants = require("../constants") | ||||||
| 
 | 
 | ||||||
| @ -11,7 +11,7 @@ const backendStatusLineMap = new Map([ | |||||||
| ]) | ]) | ||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * @returns {import("./requestbackends/reference")} |  * @returns {import("./request_backends/reference")} | ||||||
|  */ |  */ | ||||||
| function request(url, options = {}, settings = {}) { | function request(url, options = {}, settings = {}) { | ||||||
| 	if (settings.statusLine === undefined) settings.statusLine = "OUT" | 	if (settings.statusLine === undefined) settings.statusLine = "OUT" | ||||||
|  | |||||||
| @ -21,8 +21,8 @@ class TorSwitcher { | |||||||
| 	 * If the test function fails, its error will be rejected here. | 	 * If the test function fails, its error will be rejected here. | ||||||
| 	 * Only include rate limit logic in the test function! | 	 * Only include rate limit logic in the test function! | ||||||
| 	 * @param {string} url | 	 * @param {string} url | ||||||
| 	 * @param {(res: import("./requestbackends/reference").GrabResponse) => any} test | 	 * @param {(res: import("./request_backends/reference").GrabResponse) => any} test | ||||||
| 	 * @returns {Promise<import("./requestbackends/reference")>} | 	 * @returns {Promise<import("./request_backends/reference")>} | ||||||
| 	 */ | 	 */ | ||||||
| 	request(type, url, test) { | 	request(type, url, test) { | ||||||
| 		if (this.torManager && constants.tor.for[type]) { | 		if (this.torManager && constants.tor.for[type]) { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user