12345678910111213141516171819202122232425262728293031323334openAstringtypeauth={user:string;token:string}typet=|Location|Userofauth|Silent|Show_error|Configof[`Stdin|`Fileofstring]|Dump_headerof[`Ignore|`Fileofstring]|Dataof[`Dataofstring|`Fileofstring]|Data_binaryof[`Dataofstring|`Fileofstring]|Headerofstringletto_string_listopts=List.fold_left(funacc->function|Location->"--location"::acc|User{user;token}->"--user"::strf"%s:%s"usertoken::acc|Silent->"--silent"::acc|Show_error->"--show-error"::acc|Config`Stdin->"--config"::"-"::acc|Config(`Filef)->"--config"::f::acc|Dump_header`Ignore->"--dump-header"::"-"::acc|Dump_header(`Filef)->"--dump-header"::f::acc|Data(`Datad)->"--data"::d::acc(* Filenames should start with the letter [@]. *)|Data(`Filef)->"--data"::strf"@@%s"f::acc|Data_binary(`Datad)->"--data-binary"::d::acc(* Filenames should start with the letter [@]. *)|Data_binary(`Filef)->"--data-binary"::strf"@@%s"f::acc|Headerh->"--header"::h::acc)[](List.revopts)