mirror of
https://github.com/asciinema/asciinema.git
synced 2025-12-15 11:17:58 +01:00
DRY-up
This commit is contained in:
@@ -70,13 +70,9 @@ async fn create_recording_request(
|
||||
let mut url = server_url.clone();
|
||||
url.set_path("api/v1/recordings");
|
||||
let form = Form::new().file("file", path).await?;
|
||||
let builder = client.post(url).multipart(form);
|
||||
|
||||
Ok(client
|
||||
.post(url)
|
||||
.multipart(form)
|
||||
.basic_auth(get_username(), Some(install_id))
|
||||
.header(header::USER_AGENT, build_user_agent())
|
||||
.header(header::ACCEPT, "application/json"))
|
||||
Ok(add_headers(builder, &install_id))
|
||||
}
|
||||
|
||||
pub async fn list_user_streams(prefix: &str, config: &Config) -> Result<Vec<StreamResponse>> {
|
||||
|
||||
Reference in New Issue
Block a user