fixed url
This commit is contained in:
		@@ -6,6 +6,7 @@ from datetime import datetime
 | 
				
			|||||||
import requests
 | 
					import requests
 | 
				
			||||||
from .abcsender import AbcSender
 | 
					from .abcsender import AbcSender
 | 
				
			||||||
from utils import config
 | 
					from utils import config
 | 
				
			||||||
 | 
					from urllib.parse import urljoin
 | 
				
			||||||
 | 
					
 | 
				
			||||||
"""
 | 
					"""
 | 
				
			||||||
Send a sound sample
 | 
					Send a sound sample
 | 
				
			||||||
@@ -38,7 +39,7 @@ class SoundSender(AbcSender):
 | 
				
			|||||||
                    "application/json")
 | 
					                    "application/json")
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            r = requests.post(config.API_URL + "/sample", files=files)
 | 
					            r = requests.post(urljoin(config.API_URL, "/input"), files=files)
 | 
				
			||||||
            logging.debug(f"Content: {r.content.decode()}")
 | 
					            logging.debug(f"Content: {r.content.decode()}")
 | 
				
			||||||
            logging.debug(f"Headers: {r.headers}")
 | 
					            logging.debug(f"Headers: {r.headers}")
 | 
				
			||||||
            r.raise_for_status()
 | 
					            r.raise_for_status()
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user