mirror of
				https://github.com/TeamPiped/reqwest4j.git
				synced 2024-08-14 23:54:39 +00:00 
			
		
		
		
	Fix crash when there's no response body.
This commit is contained in:
		
							parent
							
								
									be5ff40c97
								
							
						
					
					
						commit
						0ad3b94bc3
					
				
					 2 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -43,7 +43,7 @@ signing {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
group = 'rocks.kavin'
 | 
			
		||||
version = '1.0.1'
 | 
			
		||||
version = '1.0.2'
 | 
			
		||||
sourceCompatibility = JavaVersion.VERSION_17
 | 
			
		||||
targetCompatibility = JavaVersion.VERSION_17
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -80,7 +80,7 @@ pub extern "system" fn Java_rocks_kavin_reqwest4j_ReqwestUtils_fetch(
 | 
			
		|||
    let final_url = env.new_string(final_url).unwrap();
 | 
			
		||||
 | 
			
		||||
    let body = RUNTIME.block_on(async {
 | 
			
		||||
        response.bytes().await.unwrap().to_vec()
 | 
			
		||||
        response.bytes().await.unwrap_or_default().to_vec()
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue