Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

Commit

Permalink
refactor: Major rework of curl commands
Browse files Browse the repository at this point in the history
  • Loading branch information
PThorpe92 committed Sep 30, 2023
1 parent 515a853 commit ff37443
Show file tree
Hide file tree
Showing 2 changed files with 195 additions and 335 deletions.
7 changes: 5 additions & 2 deletions src/request/command.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::request::curl::{Curl, CurlFlag};
use crate::request::wget::Wget;

use super::curl::AuthKind;
use super::curl::{AuthKind, CurlFlagType};

#[derive(Debug)]
pub enum Command<'a> {
Expand Down Expand Up @@ -61,7 +61,10 @@ impl<'a> Command<'a> {
pub fn set_outfile(&mut self, file: &str) {
match self {
Command::Curl(curl) => {
curl.add_flag(CurlFlag::Output(""), Some(String::from(file)));
curl.add_flag(CurlFlag::Output(
CurlFlagType::Output.get_value(),
Some(String::from(file)),
));
}
Command::Wget(wget) => {
wget.set_output(file);
Expand Down
Loading

0 comments on commit ff37443

Please sign in to comment.