utils.hastebin: set content type
This commit is contained in:
		
							parent
							
								
									f375acf9c8
								
							
						
					
					
						commit
						d929e6ffb3
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		| 
						 | 
					@ -153,6 +153,7 @@ async function getImage(msg, str) {
 | 
				
			||||||
async function hastebin(body) {
 | 
					async function hastebin(body) {
 | 
				
			||||||
  const res = await fetch(`https://nekobin.com/api/documents`, {
 | 
					  const res = await fetch(`https://nekobin.com/api/documents`, {
 | 
				
			||||||
    method: "POST",
 | 
					    method: "POST",
 | 
				
			||||||
 | 
					    headers: {"Content-Type": "application/json"},
 | 
				
			||||||
    body: JSON.stringify({content: body}),
 | 
					    body: JSON.stringify({content: body}),
 | 
				
			||||||
  }).then((r) => r.json());
 | 
					  }).then((r) => r.json());
 | 
				
			||||||
  return "https://nekobin.com" + res.result.key;
 | 
					  return "https://nekobin.com" + res.result.key;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue