curl.1 232 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400
  1. .\" **************************************************************************
  2. .\" * _ _ ____ _
  3. .\" * Project ___| | | | _ \| |
  4. .\" * / __| | | | |_) | |
  5. .\" * | (__| |_| | _ <| |___
  6. .\" * \___|\___/|_| \_\_____|
  7. .\" *
  8. .\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
  9. .\" *
  10. .\" * This software is licensed as described in the file COPYING, which
  11. .\" * you should have received as part of this distribution. The terms
  12. .\" * are also available at https://curl.se/docs/copyright.html.
  13. .\" *
  14. .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  15. .\" * copies of the Software, and permit persons to whom the Software is
  16. .\" * furnished to do so, under the terms of the COPYING file.
  17. .\" *
  18. .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  19. .\" * KIND, either express or implied.
  20. .\" *
  21. .\" * SPDX-License-Identifier: curl
  22. .\" *
  23. .\" **************************************************************************
  24. .\"
  25. .\" DO NOT EDIT. Generated by the curl project managen manpage generator.
  26. .\"
  27. .TH curl 1 "2025-01-17" "curl 8.9.1" "curl Manual"
  28. .SH NAME
  29. curl \- transfer a URL
  30. .SH SYNOPSIS
  31. \fBcurl [options / URLs]\fP
  32. .SH DESCRIPTION
  33. \fBcurl\fP is a tool for transferring data from or to a server using URLs. It
  34. supports these protocols: DICT, FILE, FTP, FTPS, GOPHER, GOPHERS, HTTP, HTTPS,
  35. IMAP, IMAPS, LDAP, LDAPS, MQTT, POP3, POP3S, RTMP, RTMPS, RTSP, SCP, SFTP,
  36. SMB, SMBS, SMTP, SMTPS, TELNET, TFTP, WS and WSS.
  37. curl is powered by libcurl for all transfer\-related features. See
  38. \fIlibcurl(3)\fP for details.
  39. .SH URL
  40. The URL syntax is protocol\-dependent. You find a detailed description in
  41. RFC 3986.
  42. If you provide a URL without a leading \fBprotocol://\fP scheme, curl guesses
  43. what protocol you want. It then defaults to HTTP but assumes others based on
  44. often\-used hostname prefixes. For example, for hostnames starting with "ftp."
  45. curl assumes you want FTP.
  46. You can specify any amount of URLs on the command line. They are fetched in a
  47. sequential manner in the specified order unless you use \fI\-Z, \-\-parallel\fP. You can
  48. specify command line options and URLs mixed and in any order on the command
  49. line.
  50. curl attempts to reuse connections when doing multiple transfers, so that
  51. getting many files from the same server do not use multiple connects and setup
  52. handshakes. This improves speed. Connection reuse can only be done for URLs
  53. specified for a single command line invocation and cannot be performed between
  54. separate curl runs.
  55. Provide an IPv6 zone id in the URL with an escaped percentage sign. Like in
  56. .nf
  57. \&"http://[fe80::3%25eth0]/"
  58. .fi
  59. Everything provided on the command line that is not a command line option or
  60. its argument, curl assumes is a URL and treats it as such.
  61. .SH GLOBBING
  62. You can specify multiple URLs or parts of URLs by writing lists within braces
  63. or ranges within brackets. We call this "globbing".
  64. Provide a list with three different names like this:
  65. .nf
  66. \&"http://site.{one,two,three}.com"
  67. .fi
  68. Do sequences of alphanumeric series by using [] as in:
  69. .nf
  70. \&"ftp://ftp.example.com/file[1\-100].txt"
  71. .fi
  72. With leading zeroes:
  73. .nf
  74. \&"ftp://ftp.example.com/file[001\-100].txt"
  75. .fi
  76. With letters through the alphabet:
  77. .nf
  78. \&"ftp://ftp.example.com/file[a\-z].txt"
  79. .fi
  80. Nested sequences are not supported, but you can use several ones next to each
  81. other:
  82. .nf
  83. \&"http://example.com/archive[1996\-1999]/vol[1\-4]/part{a,b,c}.html"
  84. .fi
  85. You can specify a step counter for the ranges to get every Nth number or
  86. letter:
  87. .nf
  88. \&"http://example.com/file[1\-100:10].txt"
  89. \&"http://example.com/file[a\-z:2].txt"
  90. .fi
  91. When using [] or {} sequences when invoked from a command line prompt, you
  92. probably have to put the full URL within double quotes to avoid the shell from
  93. interfering with it. This also goes for other characters treated special, like
  94. for example \(aq&\(aq, \(aq?\(aq and \(aq*\(aq.
  95. Switch off globbing with \fI\-g, \-\-globoff\fP.
  96. .SH VARIABLES
  97. curl supports command line variables (added in 8.3.0). Set variables with
  98. \fI\-\-variable\fP name=content or \fI\-\-variable\fP name@file (where "file" can be stdin if
  99. set to a single dash (\-)).
  100. Variable contents can be expanded in option parameters using "{{name}}" if the
  101. option name is prefixed with "\fI\-\-expand\-\fP". This gets the contents of the
  102. variable "name" inserted, or a blank if the name does not exist as a
  103. variable. Insert "{{" verbatim in the string by prefixing it with a backslash,
  104. like "\\{{".
  105. You an access and expand environment variables by first importing them. You
  106. can select to either require the environment variable to be set or you can
  107. provide a default value in case it is not already set. Plain \fI\-\-variable\fP %name
  108. imports the variable called \(aqname\(aq but exits with an error if that environment
  109. variable is not already set. To provide a default value if it is not set, use
  110. \fI\-\-variable\fP %name=content or \fI\-\-variable\fP %name@content.
  111. Example. Get the USER environment variable into the URL, fail if USER is not
  112. set:
  113. .nf
  114. -\-variable \(aq%USER\(aq
  115. -\-expand\-url = "https://example.com/api/{{USER}}/method"
  116. .fi
  117. When expanding variables, curl supports a set of functions that can make the
  118. variable contents more convenient to use. It can trim leading and trailing
  119. white space with "trim", it can output the contents as a JSON quoted string
  120. with "json", URL encode the string with "url" or base64 encode it with "b64".
  121. To apply functions to a variable expansion, add them colon separated to the
  122. right side of the variable. Variable content holding null bytes that are not
  123. encoded when expanded cause error.
  124. Example: get the contents of a file called $HOME/.secret into a variable
  125. called "fix". Make sure that the content is trimmed and percent\-encoded when
  126. sent as POST data:
  127. .nf
  128. -\-variable %HOME
  129. -\-expand\-variable fix@{{HOME}}/.secret
  130. -\-expand\-data "{{fix:trim:url}}"
  131. https://example.com/
  132. .fi
  133. Command line variables and expansions were added in 8.3.0.
  134. .SH OUTPUT
  135. If not told otherwise, curl writes the received data to stdout. It can be
  136. instructed to instead save that data into a local file, using the \fI\-o, \-\-output\fP or
  137. \fI\-O, \-\-remote\-name\fP options. If curl is given multiple URLs to transfer on the
  138. command line, it similarly needs multiple options for where to save them.
  139. curl does not parse or otherwise "understand" the content it gets or writes as
  140. output. It does no encoding or decoding, unless explicitly asked to with
  141. dedicated command line options.
  142. .SH PROTOCOLS
  143. curl supports numerous protocols, or put in URL terms: schemes. Your
  144. particular build may not support them all.
  145. .IP DICT
  146. Lets you lookup words using online dictionaries.
  147. .IP FILE
  148. Read or write local files. curl does not support accessing file:// URL
  149. remotely, but when running on Microsoft Windows using the native UNC approach
  150. works.
  151. .IP FTP(S)
  152. curl supports the File Transfer Protocol with a lot of tweaks and levers. With
  153. or without using TLS.
  154. .IP GOPHER(S)
  155. Retrieve files.
  156. .IP HTTP(S)
  157. curl supports HTTP with numerous options and variations. It can speak HTTP
  158. version 0.9, 1.0, 1.1, 2 and 3 depending on build options and the correct
  159. command line options.
  160. .IP IMAP(S)
  161. Using the mail reading protocol, curl can download emails for you. With or
  162. without using TLS.
  163. .IP LDAP(S)
  164. curl can do directory lookups for you, with or without TLS.
  165. .IP MQTT
  166. curl supports MQTT version 3. Downloading over MQTT equals subscribe to a
  167. topic while uploading/posting equals publish on a topic. MQTT over TLS is not
  168. supported (yet).
  169. .IP POP3(S)
  170. Downloading from a pop3 server means getting a mail. With or without using
  171. TLS.
  172. .IP RTMP(S)
  173. The \fBRealtime Messaging Protocol\fP is primarily used to serve streaming media
  174. and curl can download it.
  175. .IP RTSP
  176. curl supports RTSP 1.0 downloads.
  177. .IP SCP
  178. curl supports SSH version 2 scp transfers.
  179. .IP SFTP
  180. curl supports SFTP (draft 5) done over SSH version 2.
  181. .IP SMB(S)
  182. curl supports SMB version 1 for upload and download.
  183. .IP SMTP(S)
  184. Uploading contents to an SMTP server means sending an email. With or without
  185. TLS.
  186. .IP TELNET
  187. Fetching a telnet URL starts an interactive session where it sends what it
  188. reads on stdin and outputs what the server sends it.
  189. .IP TFTP
  190. curl can do TFTP downloads and uploads.
  191. .IP WS(S)
  192. WebSocket done over HTTP/1. WSS implies that it works over HTTPS.
  193. .SH PROGRESS METER
  194. curl normally displays a progress meter during operations, indicating the
  195. amount of transferred data, transfer speeds and estimated time left, etc. The
  196. progress meter displays the transfer rate in bytes per second. The suffixes
  197. (k, M, G, T, P) are 1024 based. For example 1k is 1024 bytes. 1M is 1048576
  198. bytes.
  199. curl displays this data to the terminal by default, so if you invoke curl to
  200. do an operation and it is about to write data to the terminal, it \fIdisables\fP
  201. the progress meter as otherwise it would mess up the output mixing progress
  202. meter and response data.
  203. If you want a progress meter for HTTP POST or PUT requests, you need to
  204. redirect the response output to a file, using shell redirect (>), \fI\-o, \-\-output\fP
  205. or similar.
  206. This does not apply to FTP upload as that operation does not spit out any
  207. response data to the terminal.
  208. If you prefer a progress bar instead of the regular meter, \fI\-#, \-\-progress\-bar\fP is
  209. your friend. You can also disable the progress meter completely with the
  210. \fI\-s, \-\-silent\fP option.
  211. .SH VERSION
  212. This man page describes curl 8.9.1. If you use a later version, chances
  213. are this man page does not fully document it. If you use an earlier version,
  214. this document tries to include version information about which specific
  215. version that introduced changes.
  216. You can always learn which the latest curl version is by running
  217. .nf
  218. curl https://curl.se/info
  219. .fi
  220. The online version of this man page is always showing the latest incarnation:
  221. https://curl.se/docs/manpage.html
  222. .SH OPTIONS
  223. Options start with one or two dashes. Many of the options require an
  224. additional value next to them. If provided text does not start with a dash, it
  225. is presumed to be and treated as a URL.
  226. The short "single\-dash" form of the options, \-d for example, may be used with
  227. or without a space between it and its value, although a space is a recommended
  228. separator. The long double\-dash form, \fI\-d, \-\-data\fP for example, requires a space
  229. between it and its value.
  230. Short version options that do not need any additional values can be used
  231. immediately next to each other, like for example you can specify all the
  232. options \fI\-O\fP, \fI\-L\fP and \fI\-v\fP at once as \fI\-OLv\fP.
  233. In general, all boolean options are enabled with \--\fBoption\fP and yet again
  234. disabled with \--\fBno\-\fPoption. That is, you use the same option name but
  235. prefix it with "no\-". However, in this list we mostly only list and show the
  236. -\-\fBoption\fP version of them.
  237. When \fI\-:, \-\-next\fP is used, it resets the parser state and you start again with a
  238. clean option state, except for the options that are global. Global options
  239. retain their values and meaning even after \fI\-:, \-\-next\fP.
  240. The following options are global: \fI\-\-fail\-early\fP, \fI\-\-libcurl\fP, \fI\-\-parallel\-immediate\fP, \fI\-\-parallel\-max\fP, \fI\-Z, \-\-parallel\fP, \fI\-#, \-\-progress\-bar\fP, \fI\-\-rate\fP, \fI\-S, \-\-show\-error\fP, \fI\-\-stderr\fP, \fI\-\-styled\-output\fP, \fI\-\-trace\-ascii\fP, \fI\-\-trace\-config\fP, \fI\-\-trace\-ids\fP, \fI\-\-trace\-time\fP, \fI\-\-trace\fP and \fI\-v, \-\-verbose\fP.
  241. .IP "\-\-abstract\-unix\-socket <path>"
  242. (HTTP) Connect through an abstract Unix domain socket, instead of using the network.
  243. Note: netstat shows the path of an abstract socket prefixed with "@", however
  244. the <path> argument should not have this leading character.
  245. If --abstract-unix-socket is provided several times, the last set value is used.
  246. Example:
  247. .nf
  248. curl --abstract-unix-socket socketpath https://example.com
  249. .fi
  250. See also \fI\-\-unix\-socket\fP.
  251. .IP "\-\-alt\-svc <filename>"
  252. (HTTPS) Enable the alt\-svc parser. If the filename points to an existing alt\-svc cache
  253. file, that gets used. After a completed transfer, the cache is saved to the
  254. filename again if it has been modified.
  255. Specify a "" filename (zero length) to avoid loading/saving and make curl just
  256. handle the cache in memory.
  257. If this option is used several times, curl loads contents from all the
  258. files but the last one is used for saving.
  259. --alt-svc can be used several times in a command line
  260. Example:
  261. .nf
  262. curl --alt-svc svc.txt https://example.com
  263. .fi
  264. Added in 7.64.1. See also \fI\-\-resolve\fP and \fI\-\-connect\-to\fP.
  265. .IP "\-\-anyauth"
  266. (HTTP) Figure out authentication method automatically, and use the most secure one
  267. the remote site claims to support. This is done by first doing a request and
  268. checking the response\-headers, thus possibly inducing an extra network
  269. round\-trip. This option is used instead of setting a specific authentication
  270. method, which you can do with \fI\-\-basic\fP, \fI\-\-digest\fP, \fI\-\-ntlm\fP, and \fI\-\-negotiate\fP.
  271. Using \fI\-\-anyauth\fP is not recommended if you do uploads from stdin, since it may
  272. require data to be sent twice and then the client must be able to rewind. If
  273. the need should arise when uploading from stdin, the upload operation fails.
  274. Used together with \fI\-u, \-\-user\fP.
  275. Providing --anyauth multiple times has no extra effect.
  276. Example:
  277. .nf
  278. curl --anyauth --user me:pwd https://example.com
  279. .fi
  280. See also \fI\-\-proxy\-anyauth\fP, \fI\-\-basic\fP and \fI\-\-digest\fP.
  281. .IP "\-a, \-\-append"
  282. (FTP SFTP) When used in an upload, this option makes curl append to the target file
  283. instead of overwriting it. If the remote file does not exist, it is
  284. created. Note that this flag is ignored by some SFTP servers (including
  285. OpenSSH).
  286. Providing --append multiple times has no extra effect.
  287. Disable it again with \-\-no-append.
  288. Example:
  289. .nf
  290. curl --upload-file local --append ftp://example.com/
  291. .fi
  292. See also \fI-r, \-\-range\fP and \fI-C, \-\-continue\-at\fP.
  293. .IP "\-\-aws\-sigv4 <provider1[:prvdr2[:reg[:srv]]]>"
  294. (HTTP) Use AWS V4 signature authentication in the transfer.
  295. The provider argument is a string that is used by the algorithm when creating
  296. outgoing authentication headers.
  297. The region argument is a string that points to a geographic area of
  298. a resources collection (region\-code) when the region name is omitted from
  299. the endpoint.
  300. The service argument is a string that points to a function provided by a cloud
  301. (service\-code) when the service name is omitted from the endpoint.
  302. If --aws-sigv4 is provided several times, the last set value is used.
  303. Example:
  304. .nf
  305. curl --aws-sigv4 "aws:amz:us-east-2:es" --user "key:secret" https://example.com
  306. .fi
  307. Added in 7.75.0. See also \fI\-\-basic\fP and \fI-u, \-\-user\fP.
  308. .IP "\-\-basic"
  309. (HTTP) Use HTTP Basic authentication with the remote host. This method is the default
  310. and this option is usually pointless, unless you use it to override a
  311. previously set option that sets a different authentication method (such as
  312. \fI\-\-ntlm\fP, \fI\-\-digest\fP, or \fI\-\-negotiate\fP).
  313. Used together with \fI\-u, \-\-user\fP.
  314. Providing --basic multiple times has no extra effect.
  315. Example:
  316. .nf
  317. curl -u name:password --basic https://example.com
  318. .fi
  319. See also \fI\-\-proxy\-basic\fP.
  320. .IP "\-\-ca\-native"
  321. (TLS) Use the CA store from the native operating system to verify the peer. By
  322. default, curl otherwise uses a CA store provided in a single file or
  323. directory, but when using this option it interfaces the operating system\(aqs own
  324. vault.
  325. This option works for curl on Windows when built to use OpenSSL, wolfSSL
  326. (added in 8.3.0) or GnuTLS (added in 8.5.0). When curl on Windows is built to
  327. use Schannel, this feature is implied and curl then only uses the native CA
  328. store.
  329. Providing --ca-native multiple times has no extra effect.
  330. Disable it again with \-\-no-ca-native.
  331. Example:
  332. .nf
  333. curl --ca-native https://example.com
  334. .fi
  335. Added in 8.2.0. See also \fI\-\-cacert\fP, \fI\-\-capath\fP and \fI-k, \-\-insecure\fP.
  336. .IP "\-\-cacert <file>"
  337. (TLS) Use the specified certificate file to verify the peer. The file may contain
  338. multiple CA certificates. The certificate(s) must be in PEM format. Normally
  339. curl is built to use a default file for this, so this option is typically used
  340. to alter that default file.
  341. curl recognizes the environment variable named \(aqCURL_CA_BUNDLE\(aq if it is set
  342. and the TLS backend is not Schannel, and uses the given path as a path to a CA
  343. cert bundle. This option overrides that variable.
  344. The windows version of curl automatically looks for a CA certs file named
  345. \(aqcurl\-ca\-bundle.crt\(aq, either in the same directory as curl.exe, or in the
  346. Current Working Directory, or in any folder along your PATH.
  347. (iOS and macOS only) If curl is built against Secure Transport, then this
  348. option is supported for backward compatibility with other SSL engines, but it
  349. should not be set. If the option is not set, then curl uses the certificates
  350. in the system and user Keychain to verify the peer, which is the preferred
  351. method of verifying the peer\(aqs certificate chain.
  352. (Schannel only) This option is supported for Schannel in Windows 7 or later
  353. (added in 7.60.0). This option is supported for backward compatibility with
  354. other SSL engines; instead it is recommended to use Windows\(aq store of root
  355. certificates (the default for Schannel).
  356. If --cacert is provided several times, the last set value is used.
  357. Example:
  358. .nf
  359. curl --cacert CA-file.txt https://example.com
  360. .fi
  361. See also \fI\-\-capath\fP and \fI-k, \-\-insecure\fP.
  362. .IP "\-\-capath <dir>"
  363. (TLS) Use the specified certificate directory to verify the peer. Multiple paths can
  364. be provided by separated with colon (":") (e.g. "path1:path2:path3"). The
  365. certificates must be in PEM format, and if curl is built against OpenSSL, the
  366. directory must have been processed using the c_rehash utility supplied with
  367. OpenSSL. Using \fI\-\-capath\fP can allow OpenSSL\-powered curl to make SSL\-connections
  368. much more efficiently than using \fI\-\-cacert\fP if the \fI\-\-cacert\fP file contains many
  369. CA certificates.
  370. If this option is set, the default capath value is ignored.
  371. If --capath is provided several times, the last set value is used.
  372. Example:
  373. .nf
  374. curl --capath /local/directory https://example.com
  375. .fi
  376. See also \fI\-\-cacert\fP and \fI-k, \-\-insecure\fP.
  377. .IP "\-E, \-\-cert <certificate[:password]>"
  378. (TLS) Use the specified client certificate file when getting a file with HTTPS, FTPS
  379. or another SSL\-based protocol. The certificate must be in PKCS#12 format if
  380. using Secure Transport, or PEM format if using any other engine. If the
  381. optional password is not specified, it is queried for on the terminal. Note
  382. that this option assumes a certificate file that is the private key and the
  383. client certificate concatenated. See \fI\-E, \-\-cert\fP and \fI\-\-key\fP to specify them
  384. independently.
  385. In the <certificate> portion of the argument, you must escape the character
  386. \&":" as "\\:" so that it is not recognized as the password delimiter. Similarly,
  387. you must escape the double quote character as \\" so that it is not recognized
  388. as an escape character.
  389. If curl is built against OpenSSL library, and the engine pkcs11 is available,
  390. then a PKCS#11 URI (RFC 7512) can be used to specify a certificate located in
  391. a PKCS#11 device. A string beginning with "pkcs11:" is interpreted as a
  392. PKCS#11 URI. If a PKCS#11 URI is provided, then the \fI\-\-engine\fP option is set as
  393. \&"pkcs11" if none was provided and the \fI\-\-cert\-type\fP option is set as "ENG" if
  394. none was provided.
  395. (iOS and macOS only) If curl is built against Secure Transport, then the
  396. certificate string can either be the name of a certificate/private key in the
  397. system or user keychain, or the path to a PKCS#12\-encoded certificate and
  398. private key. If you want to use a file from the current directory, please
  399. precede it with "./" prefix, in order to avoid confusion with a nickname.
  400. (Schannel only) Client certificates must be specified by a path expression to
  401. a certificate store. (Loading \fIPFX\fP is not supported; you can import it to a
  402. store first). You can use "<store location>\\<store name>\\<thumbprint>"
  403. to refer to a certificate in the system certificates store, for example,
  404. \fI"CurrentUser\\MY\\934a7ac6f8a5d579285a74fa61e19f23ddfe8d7a"\fP. Thumbprint is
  405. usually a SHA\-1 hex string which you can see in certificate details. Following
  406. store locations are supported: \fICurrentUser\fP, \fILocalMachine\fP,
  407. \fICurrentService\fP, \fIServices\fP, \fICurrentUserGroupPolicy\fP,
  408. \fILocalMachineGroupPolicy\fP and \fILocalMachineEnterprise\fP.
  409. If --cert is provided several times, the last set value is used.
  410. Example:
  411. .nf
  412. curl --cert certfile --key keyfile https://example.com
  413. .fi
  414. See also \fI\-\-cert\-type\fP, \fI\-\-key\fP and \fI\-\-key\-type\fP.
  415. .IP "\-\-cert\-status"
  416. (TLS) Verify the status of the server certificate by using the Certificate Status
  417. Request (aka. OCSP stapling) TLS extension.
  418. If this option is enabled and the server sends an invalid (e.g. expired)
  419. response, if the response suggests that the server certificate has been
  420. revoked, or no response at all is received, the verification fails.
  421. This support is currently only implemented in the OpenSSL and GnuTLS backends.
  422. Providing --cert-status multiple times has no extra effect.
  423. Disable it again with \-\-no-cert-status.
  424. Example:
  425. .nf
  426. curl --cert-status https://example.com
  427. .fi
  428. See also \fI\-\-pinnedpubkey\fP.
  429. .IP "\-\-cert\-type <type>"
  430. (TLS) Set type of the provided client certificate. PEM, DER, ENG and P12 are
  431. recognized types.
  432. The default type depends on the TLS backend and is usually PEM, however for
  433. Secure Transport and Schannel it is P12. If \fI\-E, \-\-cert\fP is a pkcs11: URI then ENG is
  434. the default type.
  435. If --cert-type is provided several times, the last set value is used.
  436. Example:
  437. .nf
  438. curl --cert-type PEM --cert file https://example.com
  439. .fi
  440. See also \fI-E, \-\-cert\fP, \fI\-\-key\fP and \fI\-\-key\-type\fP.
  441. .IP "\-\-ciphers <list of ciphers>"
  442. (TLS) Specifies which ciphers to use in the connection. The list of ciphers must
  443. specify valid ciphers. Read up on SSL cipher list details on this URL:
  444. https://curl.se/docs/ssl\-ciphers.html
  445. If --ciphers is provided several times, the last set value is used.
  446. Example:
  447. .nf
  448. curl --ciphers ECDHE-ECDSA-AES256-CCM8 https://example.com
  449. .fi
  450. See also \fI\-\-tlsv1.3\fP, \fI\-\-tls13\-ciphers\fP and \fI\-\-proxy\-ciphers\fP.
  451. .IP "\-\-compressed"
  452. (HTTP) Request a compressed response using one of the algorithms curl supports, and
  453. automatically decompress the content.
  454. Response headers are not modified when saved, so if they are "interpreted"
  455. separately again at a later point they might appear to be saying that the
  456. content is (still) compressed; while in fact it has already been decompressed.
  457. If this option is used and the server sends an unsupported encoding, curl
  458. reports an error. This is a request, not an order; the server may or may not
  459. deliver data compressed.
  460. Providing --compressed multiple times has no extra effect.
  461. Disable it again with \-\-no-compressed.
  462. Example:
  463. .nf
  464. curl --compressed https://example.com
  465. .fi
  466. See also \fI\-\-compressed\-ssh\fP.
  467. .IP "\-\-compressed\-ssh"
  468. (SCP SFTP) Enables built\-in SSH compression. This is a request, not an order; the server
  469. may or may not do it.
  470. Providing --compressed-ssh multiple times has no extra effect.
  471. Disable it again with \-\-no-compressed-ssh.
  472. Example:
  473. .nf
  474. curl --compressed-ssh sftp://example.com/
  475. .fi
  476. See also \fI\-\-compressed\fP.
  477. .IP "\-K, \-\-config <file>"
  478. Specify a text file to read curl arguments from. The command line arguments
  479. found in the text file are used as if they were provided on the command
  480. line.
  481. Options and their parameters must be specified on the same line in the file,
  482. separated by whitespace, colon, or the equals sign. Long option names can
  483. optionally be given in the config file without the initial double dashes and
  484. if so, the colon or equals characters can be used as separators. If the option
  485. is specified with one or two dashes, there can be no colon or equals character
  486. between the option and its parameter.
  487. If the parameter contains whitespace or starts with a colon (:) or equals sign
  488. (=), it must be specified enclosed within double quotes ("like this"). Within
  489. double quotes the following escape sequences are available: \\\\, \\", \\t, \\n, \\r
  490. and \\v. A backslash preceding any other letter is ignored.
  491. If the first non\-blank column of a config line is a \(aq#\(aq character, that line
  492. is treated as a comment.
  493. Only write one option per physical line in the config file. A single line is
  494. required to be no more than 10 megabytes (since 8.2.0).
  495. Specify the filename to \fI\-K, \-\-config\fP as minus "\-" to make curl read the file from
  496. stdin.
  497. Note that to be able to specify a URL in the config file, you need to specify
  498. it using the \fI\-\-url\fP option, and not by simply writing the URL on its own
  499. line. So, it could look similar to this:
  500. .nf
  501. url = "https://curl.se/docs/"
  502. # \--\- Example file \--\-
  503. # this is a comment
  504. url = "example.com"
  505. output = "curlhere.html"
  506. user\-agent = "superagent/1.0"
  507. # and fetch another URL too
  508. url = "example.com/docs/manpage.html"
  509. -O
  510. referer = "http://nowhereatall.example.com/"
  511. # \--\- End of example file \--\-
  512. .fi
  513. When curl is invoked, it (unless \fI\-q, \-\-disable\fP is used) checks for a default
  514. config file and uses it if found, even when \fI\-K, \-\-config\fP is used. The default
  515. config file is checked for in the following places in this order:
  516. 1) \fB"$CURL_HOME/.curlrc"\fP
  517. 2) \fB"$XDG_CONFIG_HOME/curlrc"\fP (Added in 7.73.0)
  518. 3) \fB"$HOME/.curlrc"\fP
  519. 4) Windows: \fB"%USERPROFILE%\\.curlrc"\fP
  520. 5) Windows: \fB"%APPDATA%\\.curlrc"\fP
  521. 6) Windows: \fB"%USERPROFILE%\\Application Data\\.curlrc"\fP
  522. 7) Non\-Windows: use getpwuid to find the home directory
  523. 8) On Windows, if it finds no \fI.curlrc\fP file in the sequence described above, it
  524. checks for one in the same directory the curl executable is placed.
  525. On Windows two filenames are checked per location: \fI.curlrc\fP and \fI_curlrc\fP,
  526. preferring the former. Older versions on Windows checked for \fI_curlrc\fP only.
  527. --config can be used several times in a command line
  528. Example:
  529. .nf
  530. curl --config file.txt https://example.com
  531. .fi
  532. See also \fI-q, \-\-disable\fP.
  533. .IP "\-\-connect\-timeout <seconds>"
  534. Maximum time in seconds that you allow curl\(aqs connection to take. This only
  535. limits the connection phase, so if curl connects within the given period it
  536. continues \- if not it exits.
  537. This option accepts decimal values. The decimal value needs
  538. to be provided using a dot (.) as decimal separator \- not the local version
  539. even if it might be using another separator.
  540. The connection phase is considered complete when the DNS lookup and requested
  541. TCP, TLS or QUIC handshakes are done.
  542. If --connect-timeout is provided several times, the last set value is used.
  543. Examples:
  544. .nf
  545. curl --connect-timeout 20 https://example.com
  546. curl --connect-timeout 3.14 https://example.com
  547. .fi
  548. See also \fI-m, \-\-max\-time\fP.
  549. .IP "\-\-connect\-to <HOST1:PORT1:HOST2:PORT2>"
  550. For a request intended for the "HOST1:PORT1" pair, connect to "HOST2:PORT2"
  551. instead. This option is only used to establish the network connection. It does
  552. NOT affect the hostname/port number that is used for TLS/SSL (e.g. SNI,
  553. certificate verification) or for the application protocols.
  554. \&"HOST1" and "PORT1" may be empty strings, meaning any host or any port number.
  555. \&"HOST2" and "PORT2" may also be empty strings, meaning use the request\(aqs
  556. original hostname and port number.
  557. A hostname specified to this option is compared as a string, so it needs to
  558. match the name used in request URL. It can be either numerical such as
  559. \&"127.0.0.1" or the full host name such as "example.org".
  560. Example: redirect connects from the example.com hostname to 127.0.0.1
  561. independently of port number:
  562. .nf
  563. curl \--connect\-to example.com::127.0.0.1: https://example.com/
  564. .fi
  565. Example: redirect connects from all hostnames to 127.0.0.1 independently of
  566. port number:
  567. .nf
  568. curl \--connect\-to ::127.0.0.1: http://example.com/
  569. .fi
  570. --connect-to can be used several times in a command line
  571. Example:
  572. .nf
  573. curl --connect-to example.com:443:example.net:8443 https://example.com
  574. .fi
  575. See also \fI\-\-resolve\fP and \fI-H, \-\-header\fP.
  576. .IP "\-C, \-\-continue\-at <offset>"
  577. Resume a previous transfer from the given byte offset. The given offset is the
  578. exact number of bytes that are skipped, counting from the beginning of the
  579. source file before it is transferred to the destination. If used with uploads,
  580. the FTP server command SIZE is not used by curl.
  581. Use "\-C \-" to instruct curl to automatically find out where/how to resume the
  582. transfer. It then uses the given output/input files to figure that out.
  583. If --continue-at is provided several times, the last set value is used.
  584. Examples:
  585. .nf
  586. curl -C - https://example.com
  587. curl -C 400 https://example.com
  588. .fi
  589. See also \fI-r, \-\-range\fP.
  590. .IP "\-b, \-\-cookie <data|filename>"
  591. (HTTP) Pass the data to the HTTP server in the Cookie header. It is supposedly the
  592. data previously received from the server in a "Set\-Cookie:" line. The data
  593. should be in the format "NAME1=VALUE1; NAME2=VALUE2" or as a single filename.
  594. When given a set of specific cookies and not a filename, it makes curl use the
  595. cookie header with this content explicitly in all outgoing request(s). If
  596. multiple requests are done due to authentication, followed redirects or
  597. similar, they all get this cookie header passed on.
  598. If no "=" symbol is used in the argument, it is instead treated as a filename
  599. to read previously stored cookie from. This option also activates the cookie
  600. engine which makes curl record incoming cookies, which may be handy if you are
  601. using this in combination with the \fI\-L, \-\-location\fP option or do multiple URL
  602. transfers on the same invoke.
  603. If the filename is a single minus ("\-"), curl reads the contents from stdin.
  604. If the filename is an empty string ("") and is the only cookie input, curl
  605. activates the cookie engine without any cookies.
  606. The file format of the file to read cookies from should be plain HTTP headers
  607. (Set\-Cookie style) or the Netscape/Mozilla cookie file format.
  608. The file specified with \fI\-b, \-\-cookie\fP is only used as input. No cookies are written
  609. to that file. To store cookies, use the \fI\-c, \-\-cookie\-jar\fP option.
  610. If you use the Set\-Cookie file format and do not specify a domain then the
  611. cookie is not sent since the domain never matches. To address this, set a
  612. domain in Set\-Cookie line (doing that includes subdomains) or preferably: use
  613. the Netscape format.
  614. Users often want to both read cookies from a file and write updated cookies
  615. back to a file, so using both \fI\-b, \-\-cookie\fP and \fI\-c, \-\-cookie\-jar\fP in the same command
  616. line is common.
  617. If curl is built with PSL (\fBPublic Suffix List\fP) support, it detects and
  618. discards cookies that are specified for such suffix domains that should not be
  619. allowed to have cookies. If curl is \fInot\fP built with PSL support, it has no
  620. ability to stop super cookies.
  621. --cookie can be used several times in a command line
  622. Examples:
  623. .nf
  624. curl -b "" https://example.com
  625. curl -b cookiefile https://example.com
  626. curl -b cookiefile -c cookiefile https://example.com
  627. curl -b name=Jane https://example.com
  628. .fi
  629. See also \fI-c, \-\-cookie\-jar\fP and \fI-j, \-\-junk\-session\-cookies\fP.
  630. .IP "\-c, \-\-cookie\-jar <filename>"
  631. (HTTP) Specify to which file you want curl to write all cookies after a completed
  632. operation. Curl writes all cookies from its in\-memory cookie storage to the
  633. given file at the end of operations. Even if no cookies are known, a file is
  634. created so that it removes any formerly existing cookies from the file. The
  635. file uses the Netscape cookie file format. If you set the filename to a single
  636. minus, "\-", the cookies are written to stdout.
  637. The file specified with \fI\-c, \-\-cookie\-jar\fP is only used for output. No cookies are
  638. read from the file. To read cookies, use the \fI\-b, \-\-cookie\fP option. Both options
  639. can specify the same file.
  640. This command line option activates the cookie engine that makes curl record
  641. and use cookies. The \fI\-b, \-\-cookie\fP option also activates it.
  642. If the cookie jar cannot be created or written to, the whole curl operation
  643. does not fail or even report an error clearly. Using \fI\-v, \-\-verbose\fP gets a warning
  644. displayed, but that is the only visible feedback you get about this possibly
  645. lethal situation.
  646. If --cookie-jar is provided several times, the last set value is used.
  647. Examples:
  648. .nf
  649. curl -c store-here.txt https://example.com
  650. curl -c store-here.txt -b read-these https://example.com
  651. .fi
  652. See also \fI-b, \-\-cookie\fP and \fI-j, \-\-junk\-session\-cookies\fP.
  653. .IP "\-\-create\-dirs"
  654. When used in conjunction with the \fI\-o, \-\-output\fP option, curl creates the necessary
  655. local directory hierarchy as needed. This option creates the directories
  656. mentioned with the \fI\-o, \-\-output\fP option combined with the path possibly set with
  657. \fI\-\-output\-dir\fP. If the combined output filename uses no directory, or if the
  658. directories it mentions already exist, no directories are created.
  659. Created directories are made with mode 0750 on unix style file systems.
  660. To create remote directories when using FTP or SFTP, try \fI\-\-ftp\-create\-dirs\fP.
  661. Providing --create-dirs multiple times has no extra effect.
  662. Disable it again with \-\-no-create-dirs.
  663. Example:
  664. .nf
  665. curl --create-dirs --output local/dir/file https://example.com
  666. .fi
  667. See also \fI\-\-ftp\-create\-dirs\fP and \fI\-\-output\-dir\fP.
  668. .IP "\-\-create\-file\-mode <mode>"
  669. (SFTP SCP FILE) When curl is used to create files remotely using one of the supported
  670. protocols, this option allows the user to set which \(aqmode\(aq to set on the file
  671. at creation time, instead of the default 0644.
  672. This option takes an octal number as argument.
  673. If --create-file-mode is provided several times, the last set value is used.
  674. Example:
  675. .nf
  676. curl --create-file-mode 0777 -T localfile sftp://example.com/new
  677. .fi
  678. Added in 7.75.0. See also \fI\-\-ftp\-create\-dirs\fP.
  679. .IP "\-\-crlf"
  680. (FTP SMTP) Convert line feeds to carriage return plus line feeds in upload. Useful for
  681. \fBMVS (OS/390)\fP.
  682. Providing --crlf multiple times has no extra effect.
  683. Disable it again with \-\-no-crlf.
  684. Example:
  685. .nf
  686. curl --crlf -T file ftp://example.com/
  687. .fi
  688. See also \fI-B, \-\-use\-ascii\fP.
  689. .IP "\-\-crlfile <file>"
  690. (TLS) Provide a file using PEM format with a Certificate Revocation List that may
  691. specify peer certificates that are to be considered revoked.
  692. If --crlfile is provided several times, the last set value is used.
  693. Example:
  694. .nf
  695. curl --crlfile rejects.txt https://example.com
  696. .fi
  697. See also \fI\-\-cacert\fP and \fI\-\-capath\fP.
  698. .IP "\-\-curves <list>"
  699. (TLS) Set specific curves to use during SSL session establishment according to RFC
  700. 8422, 5.1. Multiple algorithms can be provided by separating them with ":"
  701. (e.g. "X25519:P\-521"). The parameter is available identically in the OpenSSL
  702. \&"s_client" and "s_server" utilities.
  703. \fI\-\-curves\fP allows a OpenSSL powered curl to make SSL\-connections with exactly
  704. the (EC) curve requested by the client, avoiding nontransparent client/server
  705. negotiations.
  706. If this option is set, the default curves list built into OpenSSL are ignored.
  707. If --curves is provided several times, the last set value is used.
  708. Example:
  709. .nf
  710. curl --curves X25519 https://example.com
  711. .fi
  712. Added in 7.73.0. See also \fI\-\-ciphers\fP.
  713. .IP "\-d, \-\-data <data>"
  714. (HTTP MQTT) Sends the specified data in a POST request to the HTTP server, in the same way
  715. that a browser does when a user has filled in an HTML form and presses the
  716. submit button. This option makes curl pass the data to the server using the
  717. content\-type application/x\-www\-form\-urlencoded. Compare to \fI\-F, \-\-form\fP.
  718. \fI\-\-data\-raw\fP is almost the same but does not have a special interpretation of
  719. the @ character. To post data purely binary, you should instead use the
  720. \fI\-\-data\-binary\fP option. To URL\-encode the value of a form field you may use
  721. \fI\-\-data\-urlencode\fP.
  722. If any of these options is used more than once on the same command line, the
  723. data pieces specified are merged with a separating &\-symbol. Thus, using
  724. \(aq\-d name=daniel \-d skill=lousy\(aq would generate a post chunk that looks like
  725. \(aqname=daniel&skill=lousy\(aq.
  726. If you start the data with the letter @, the rest should be a filename to read
  727. the data from, or \- if you want curl to read the data from stdin. Posting data
  728. from a file named \(aqfoobar\(aq would thus be done with \fI\-d, \-\-data\fP @foobar. When \fI\-d, \-\-data\fP
  729. is told to read from a file like that, carriage returns, newlines and null
  730. bytes are stripped out. If you do not want the @ character to have a special
  731. interpretation use \fI\-\-data\-raw\fP instead.
  732. The data for this option is passed on to the server exactly as provided on the
  733. command line. curl does not convert, change or improve it. It is up to the
  734. user to provide the data in the correct form.
  735. --data can be used several times in a command line
  736. Examples:
  737. .nf
  738. curl -d "name=curl" https://example.com
  739. curl -d "name=curl" -d "tool=cmdline" https://example.com
  740. curl -d @filename https://example.com
  741. .fi
  742. This option is mutually exclusive with \fI-F, \-\-form\fP, \fI-I, \-\-head\fP and \fI-T, \-\-upload\-file\fP.
  743. See also \fI\-\-data\-binary\fP, \fI\-\-data\-urlencode\fP and \fI\-\-data\-raw\fP.
  744. .IP "\-\-data\-ascii <data>"
  745. (HTTP) This option is just an alias for \fI\-d, \-\-data\fP.
  746. --data-ascii can be used several times in a command line
  747. Example:
  748. .nf
  749. curl --data-ascii @file https://example.com
  750. .fi
  751. See also \fI\-\-data\-binary\fP, \fI\-\-data\-raw\fP and \fI\-\-data\-urlencode\fP.
  752. .IP "\-\-data\-binary <data>"
  753. (HTTP) Post data exactly as specified with no extra processing whatsoever.
  754. If you start the data with the letter @, the rest should be a filename. Data
  755. is posted in a similar manner as \fI\-d, \-\-data\fP does, except that newlines and
  756. carriage returns are preserved and conversions are never done.
  757. Like \fI\-d, \-\-data\fP the default content\-type sent to the server is
  758. application/x\-www\-form\-urlencoded. If you want the data to be treated as
  759. arbitrary binary data by the server then set the content\-type to octet\-stream:
  760. -H "Content\-Type: application/octet\-stream".
  761. If this option is used several times, the ones following the first append
  762. data as described in \fI\-d, \-\-data\fP.
  763. --data-binary can be used several times in a command line
  764. Example:
  765. .nf
  766. curl --data-binary @filename https://example.com
  767. .fi
  768. See also \fI\-\-data\-ascii\fP.
  769. .IP "\-\-data\-raw <data>"
  770. (HTTP) Post data similarly to \fI\-d, \-\-data\fP but without the special interpretation of the @
  771. character.
  772. --data-raw can be used several times in a command line
  773. Examples:
  774. .nf
  775. curl --data-raw "hello" https://example.com
  776. curl --data-raw "@at@at@" https://example.com
  777. .fi
  778. See also \fI-d, \-\-data\fP.
  779. .IP "\-\-data\-urlencode <data>"
  780. (HTTP) Post data, similar to the other \fI\-d, \-\-data\fP options with the exception that this
  781. performs URL\-encoding.
  782. To be CGI\-compliant, the <data> part should begin with a \fIname\fP followed by
  783. a separator and a content specification. The <data> part can be passed to
  784. curl using one of the following syntaxes:
  785. .RS
  786. .IP content
  787. URL\-encode the content and pass that on. Just be careful so that the content
  788. does not contain any "=" or "@" symbols, as that makes the syntax match one of
  789. the other cases below!
  790. .IP =content
  791. URL\-encode the content and pass that on. The preceding "=" symbol is not
  792. included in the data.
  793. .IP name=content
  794. URL\-encode the content part and pass that on. Note that the name part is
  795. expected to be URL\-encoded already.
  796. .IP @filename
  797. load data from the given file (including any newlines), URL\-encode that data
  798. and pass it on in the POST.
  799. .IP name@filename
  800. load data from the given file (including any newlines), URL\-encode that data
  801. and pass it on in the POST. The name part gets an equal sign appended,
  802. resulting in \fIname=urlencoded\-file\-content\fP. Note that the name is expected to
  803. be URL\-encoded already.
  804. .RE
  805. .IP
  806. --data-urlencode can be used several times in a command line
  807. Examples:
  808. .nf
  809. curl --data-urlencode name=val https://example.com
  810. curl --data-urlencode =encodethis https://example.com
  811. curl --data-urlencode name@file https://example.com
  812. curl --data-urlencode @fileonly https://example.com
  813. .fi
  814. See also \fI-d, \-\-data\fP and \fI\-\-data\-raw\fP.
  815. .IP "\-\-delegation <LEVEL>"
  816. (GSS/kerberos) Set LEVEL what curl is allowed to delegate when it comes to user credentials.
  817. .RS
  818. .IP none
  819. Do not allow any delegation.
  820. .IP policy
  821. Delegates if and only if the OK\-AS\-DELEGATE flag is set in the Kerberos
  822. service ticket, which is a matter of realm policy.
  823. .IP always
  824. Unconditionally allow the server to delegate.
  825. .RE
  826. .IP
  827. If --delegation is provided several times, the last set value is used.
  828. Example:
  829. .nf
  830. curl --delegation "none" https://example.com
  831. .fi
  832. See also \fI-k, \-\-insecure\fP and \fI\-\-ssl\fP.
  833. .IP "\-\-digest"
  834. (HTTP) Enables HTTP Digest authentication. This authentication scheme avoids sending
  835. the password over the wire in clear text. Use this in combination with the
  836. normal \fI\-u, \-\-user\fP option to set username and password.
  837. Providing --digest multiple times has no extra effect.
  838. Disable it again with \-\-no-digest.
  839. Example:
  840. .nf
  841. curl -u name:password --digest https://example.com
  842. .fi
  843. This option is mutually exclusive with \fI\-\-basic\fP, \fI\-\-ntlm\fP and \fI\-\-negotiate\fP.
  844. See also \fI-u, \-\-user\fP, \fI\-\-proxy\-digest\fP and \fI\-\-anyauth\fP.
  845. .IP "\-q, \-\-disable"
  846. If used as the \fBfirst\fP parameter on the command line, the \fIcurlrc\fP config
  847. file is not read or used. See the \fI\-K, \-\-config\fP for details on the default config
  848. file search path.
  849. Providing --disable multiple times has no extra effect.
  850. Disable it again with \-\-no-disable.
  851. Example:
  852. .nf
  853. curl -q https://example.com
  854. .fi
  855. See also \fI-K, \-\-config\fP.
  856. .IP "\-\-disable\-eprt"
  857. (FTP) Disable the use of the EPRT and LPRT commands when doing active FTP transfers.
  858. Curl normally first attempts to use EPRT before using PORT, but with this
  859. option, it uses PORT right away. EPRT is an extension to the original FTP
  860. protocol, and does not work on all servers, but enables more functionality in
  861. a better way than the traditional PORT command.
  862. \fI\-\-eprt\fP can be used to explicitly enable EPRT again and \fI\-\-no\-eprt\fP is an alias
  863. for \fI\-\-disable\-eprt\fP.
  864. If the server is accessed using IPv6, this option has no effect as EPRT is
  865. necessary then.
  866. Disabling EPRT only changes the active behavior. If you want to switch to
  867. passive mode you need to not use \fI\-P, \-\-ftp\-port\fP or force it with \fI\-\-ftp\-pasv\fP.
  868. Providing --disable-eprt multiple times has no extra effect.
  869. Disable it again with \-\-no-disable-eprt.
  870. Example:
  871. .nf
  872. curl --disable-eprt ftp://example.com/
  873. .fi
  874. See also \fI\-\-disable\-epsv\fP and \fI-P, \-\-ftp\-port\fP.
  875. .IP "\-\-disable\-epsv"
  876. (FTP) Disable the use of the EPSV command when doing passive FTP transfers. Curl
  877. normally first attempts to use EPSV before PASV, but with this option, it does
  878. not try EPSV.
  879. \fI\-\-epsv\fP can be used to explicitly enable EPSV again and \fI\-\-no\-epsv\fP is an alias
  880. for \fI\-\-disable\-epsv\fP.
  881. If the server is an IPv6 host, this option has no effect as EPSV is necessary
  882. then.
  883. Disabling EPSV only changes the passive behavior. If you want to switch to
  884. active mode you need to use \fI\-P, \-\-ftp\-port\fP.
  885. Providing --disable-epsv multiple times has no extra effect.
  886. Disable it again with \-\-no-disable-epsv.
  887. Example:
  888. .nf
  889. curl --disable-epsv ftp://example.com/
  890. .fi
  891. See also \fI\-\-disable\-eprt\fP and \fI-P, \-\-ftp\-port\fP.
  892. .IP "\-\-disallow\-username\-in\-url"
  893. Exit with error if passed a URL containing a username. Probably most useful
  894. when the URL is being provided at runtime or similar.
  895. Providing --disallow-username-in-url multiple times has no extra effect.
  896. Disable it again with \-\-no-disallow-username-in-url.
  897. Example:
  898. .nf
  899. curl --disallow-username-in-url https://example.com
  900. .fi
  901. Added in 7.61.0. See also \fI\-\-proto\fP.
  902. .IP "\-\-dns\-interface <interface>"
  903. (DNS) Send outgoing DNS requests through the given interface. This option is a
  904. counterpart to \fI\-\-interface\fP (which does not affect DNS). The supplied string
  905. must be an interface name (not an address).
  906. If --dns-interface is provided several times, the last set value is used.
  907. Example:
  908. .nf
  909. curl --dns-interface eth0 https://example.com
  910. .fi
  911. \fI\-\-dns\-interface\fP requires that libcurl is built to support c-ares.
  912. See also \fI\-\-dns\-ipv4\-addr\fP and \fI\-\-dns\-ipv6\-addr\fP.
  913. .IP "\-\-dns\-ipv4\-addr <address>"
  914. (DNS) Bind to a specific IP address when making IPv4 DNS requests, so that the DNS
  915. requests originate from this address. The argument should be a single IPv4
  916. address.
  917. If --dns-ipv4-addr is provided several times, the last set value is used.
  918. Example:
  919. .nf
  920. curl --dns-ipv4-addr 10.1.2.3 https://example.com
  921. .fi
  922. \fI\-\-dns\-ipv4\-addr\fP requires that libcurl is built to support c-ares.
  923. See also \fI\-\-dns\-interface\fP and \fI\-\-dns\-ipv6\-addr\fP.
  924. .IP "\-\-dns\-ipv6\-addr <address>"
  925. (DNS) Bind to a specific IP address when making IPv6 DNS requests, so that the DNS
  926. requests originate from this address. The argument should be a single IPv6
  927. address.
  928. If --dns-ipv6-addr is provided several times, the last set value is used.
  929. Example:
  930. .nf
  931. curl --dns-ipv6-addr 2a04:4e42::561 https://example.com
  932. .fi
  933. \fI\-\-dns\-ipv6\-addr\fP requires that libcurl is built to support c-ares.
  934. See also \fI\-\-dns\-interface\fP and \fI\-\-dns\-ipv4\-addr\fP.
  935. .IP "\-\-dns\-servers <addresses>"
  936. (DNS) Set the list of DNS servers to be used instead of the system default. The list
  937. of IP addresses should be separated with commas. Port numbers may also
  938. optionally be given, appended to the IP address separated with a colon.
  939. If --dns-servers is provided several times, the last set value is used.
  940. Examples:
  941. .nf
  942. curl --dns-servers 192.168.0.1,192.168.0.2 https://example.com
  943. curl --dns-servers 10.0.0.1:53 https://example.com
  944. .fi
  945. \fI\-\-dns\-servers\fP requires that libcurl is built to support c-ares.
  946. See also \fI\-\-dns\-interface\fP and \fI\-\-dns\-ipv4\-addr\fP.
  947. .IP "\-\-doh\-cert\-status"
  948. Same as \fI\-\-cert\-status\fP but used for DoH (DNS\-over\-HTTPS).
  949. Verifies the status of the DoH servers\(aq certificate by using the Certificate
  950. Status Request (aka. OCSP stapling) TLS extension.
  951. If this option is enabled and the DoH server sends an invalid (e.g. expired)
  952. response, if the response suggests that the server certificate has been
  953. revoked, or no response at all is received, the verification fails.
  954. This support is currently only implemented in the OpenSSL and GnuTLS backends.
  955. Providing --doh-cert-status multiple times has no extra effect.
  956. Disable it again with \-\-no-doh-cert-status.
  957. Example:
  958. .nf
  959. curl --doh-cert-status --doh-url https://doh.example https://example.com
  960. .fi
  961. Added in 7.76.0. See also \fI\-\-doh\-insecure\fP.
  962. .IP "\-\-doh\-insecure"
  963. By default, every connection curl makes to a DoH server is verified to be
  964. secure before the transfer takes place. This option tells curl to skip the
  965. verification step and proceed without checking.
  966. \fBWARNING\fP: using this option makes the DoH transfer and name resolution
  967. insecure.
  968. This option is equivalent to \fI\-k, \-\-insecure\fP and \fI\-\-proxy\-insecure\fP but used for DoH
  969. (DNS\-over\-HTTPS) only.
  970. Providing --doh-insecure multiple times has no extra effect.
  971. Disable it again with \-\-no-doh-insecure.
  972. Example:
  973. .nf
  974. curl --doh-insecure --doh-url https://doh.example https://example.com
  975. .fi
  976. Added in 7.76.0. See also \fI\-\-doh\-url\fP, \fI-k, \-\-insecure\fP and \fI\-\-proxy\-insecure\fP.
  977. .IP "\-\-doh\-url <URL>"
  978. Specifies which DNS\-over\-HTTPS (DoH) server to use to resolve hostnames,
  979. instead of using the default name resolver mechanism. The URL must be HTTPS.
  980. Some SSL options that you set for your transfer also applies to DoH since the
  981. name lookups take place over SSL. However, the certificate verification
  982. settings are not inherited but are controlled separately via \fI\-\-doh\-insecure\fP
  983. and \fI\-\-doh\-cert\-status\fP.
  984. This option is unset if an empty string "" is used as the URL.
  985. (Added in 7.85.0)
  986. If --doh-url is provided several times, the last set value is used.
  987. Example:
  988. .nf
  989. curl --doh-url https://doh.example https://example.com
  990. .fi
  991. Added in 7.62.0. See also \fI\-\-doh\-insecure\fP.
  992. .IP "\-D, \-\-dump\-header <filename>"
  993. (HTTP FTP) Write the received protocol headers to the specified file. If no headers are
  994. received, the use of this option creates an empty file. Specify "\-" as file
  995. name (a single minus) to have it written to stdout.
  996. When used in FTP, the FTP server response lines are considered being "headers"
  997. and thus are saved there.
  998. Having multiple transfers in one set of operations (i.e. the URLs in one
  999. \fI\-:, \-\-next\fP clause), appends them to the same file, separated by a blank line.
  1000. If --dump-header is provided several times, the last set value is used.
  1001. Examples:
  1002. .nf
  1003. curl --dump-header store.txt https://example.com
  1004. curl --dump-header - https://example.com -o save
  1005. .fi
  1006. See also \fI-o, \-\-output\fP.
  1007. .IP "\-\-ech <config>"
  1008. (HTTPS) Specifies how to do ECH (Encrypted Client Hello).
  1009. The values allowed for <config> can be:
  1010. .RS
  1011. .IP false
  1012. Do not attempt ECH
  1013. .IP grease
  1014. Send a GREASE ECH extension
  1015. .IP true
  1016. Attempt ECH if possible, but do not fail if ECH is not attempted.
  1017. (The connection fails if ECH is attempted but fails.)
  1018. .IP hard
  1019. Attempt ECH and fail if that is not possible.
  1020. ECH only works with TLS 1.3 and also requires using
  1021. DoH or providing an ECHConfigList on the command line.
  1022. .IP ecl:<b64val>
  1023. A base64 encoded ECHConfigList that is used for ECH.
  1024. .IP pn:<name>
  1025. A name to use to over\-ride the "public_name" field of an ECHConfigList
  1026. (only available with OpenSSL TLS support)
  1027. .IP Errors
  1028. Most errors cause error
  1029. \fICURLE_ECH_REQUIRED\fP (101).
  1030. .RE
  1031. .IP
  1032. If --ech is provided several times, the last set value is used.
  1033. Example:
  1034. .nf
  1035. curl --ech true https://example.com
  1036. .fi
  1037. Added in 8.8.0. See also \fI\-\-doh\-url\fP.
  1038. .IP "\-\-egd\-file <file>"
  1039. (TLS) Deprecated option (added in 7.84.0). Prior to that it only had an effect on
  1040. curl if built to use old versions of OpenSSL.
  1041. Specify the path name to the Entropy Gathering Daemon socket. The socket is
  1042. used to seed the random engine for SSL connections.
  1043. If --egd-file is provided several times, the last set value is used.
  1044. Example:
  1045. .nf
  1046. curl --egd-file /random/here https://example.com
  1047. .fi
  1048. See also \fI\-\-random\-file\fP.
  1049. .IP "\-\-engine <name>"
  1050. (TLS) Select the OpenSSL crypto engine to use for cipher operations. Use \fI\-\-engine\fP
  1051. list to print a list of build\-time supported engines. Note that not all (and
  1052. possibly none) of the engines may be available at runtime.
  1053. If --engine is provided several times, the last set value is used.
  1054. Example:
  1055. .nf
  1056. curl --engine flavor https://example.com
  1057. .fi
  1058. See also \fI\-\-ciphers\fP and \fI\-\-curves\fP.
  1059. .IP "\-\-etag\-compare <file>"
  1060. (HTTP) Make a conditional HTTP request for the specific ETag read from the given file
  1061. by sending a custom If\-None\-Match header using the stored ETag.
  1062. For correct results, make sure that the specified file contains only a single
  1063. line with the desired ETag. An empty file is parsed as an empty ETag.
  1064. Use the option \fI\-\-etag\-save\fP to first save the ETag from a response, and then
  1065. use this option to compare against the saved ETag in a subsequent request.
  1066. If --etag-compare is provided several times, the last set value is used.
  1067. Example:
  1068. .nf
  1069. curl --etag-compare etag.txt https://example.com
  1070. .fi
  1071. Added in 7.68.0. See also \fI\-\-etag\-save\fP and \fI-z, \-\-time\-cond\fP.
  1072. .IP "\-\-etag\-save <file>"
  1073. (HTTP) Save an HTTP ETag to the specified file. An ETag is a caching related header,
  1074. usually returned in a response.
  1075. If no ETag is sent by the server, an empty file is created.
  1076. If --etag-save is provided several times, the last set value is used.
  1077. Example:
  1078. .nf
  1079. curl --etag-save storetag.txt https://example.com
  1080. .fi
  1081. Added in 7.68.0. See also \fI\-\-etag\-compare\fP.
  1082. .IP "\-\-expect100\-timeout <seconds>"
  1083. (HTTP) Maximum time in seconds that you allow curl to wait for a 100\-continue
  1084. response when curl emits an Expects: 100\-continue header in its request. By
  1085. default curl waits one second. This option accepts decimal values. When curl
  1086. stops waiting, it continues as if a response was received.
  1087. The decimal value needs to provided using a dot (".") as decimal separator \-
  1088. not the local version even if it might be using another separator.
  1089. If --expect100-timeout is provided several times, the last set value is used.
  1090. Example:
  1091. .nf
  1092. curl --expect100-timeout 2.5 -T file https://example.com
  1093. .fi
  1094. See also \fI\-\-connect\-timeout\fP.
  1095. .IP "\-f, \-\-fail"
  1096. (HTTP) Fail with error code 22 and with no response body output at all for HTTP
  1097. transfers returning HTTP response codes at 400 or greater.
  1098. In normal cases when an HTTP server fails to deliver a document, it returns a
  1099. body of text stating so (which often also describes why and more) and a 4xx
  1100. HTTP response code. This command line option prevents curl from outputting
  1101. that data and instead returns error 22 early. By default, curl does not
  1102. consider HTTP response codes to indicate failure.
  1103. To get both the error code and also save the content, use \fI\-\-fail\-with\-body\fP
  1104. instead.
  1105. This method is not fail\-safe and there are occasions where non\-successful
  1106. response codes slip through, especially when authentication is involved
  1107. (response codes 401 and 407).
  1108. Providing --fail multiple times has no extra effect.
  1109. Disable it again with \-\-no-fail.
  1110. Example:
  1111. .nf
  1112. curl --fail https://example.com
  1113. .fi
  1114. This option is mutually exclusive with \fI\-\-fail\-with\-body\fP.
  1115. See also \fI\-\-fail\-with\-body\fP and \fI\-\-fail\-early\fP.
  1116. .IP "\-\-fail\-early"
  1117. Fail and exit on the first detected transfer error.
  1118. When curl is used to do multiple transfers on the command line, it attempts to
  1119. operate on each given URL, one by one. By default, it ignores errors if there
  1120. are more URLs given and the last URL\(aqs success determines the error code curl
  1121. returns. Early failures are "hidden" by subsequent successful transfers.
  1122. Using this option, curl instead returns an error on the first transfer that
  1123. fails, independent of the amount of URLs that are given on the command
  1124. line. This way, no transfer failures go undetected by scripts and similar.
  1125. This option does not imply \fI\-f, \-\-fail\fP, which causes transfers to fail due to the
  1126. server\(aqs HTTP status code. You can combine the two options, however note \fI\-f, \-\-fail\fP
  1127. is not global and is therefore contained by \fI\-:, \-\-next\fP.
  1128. This option is global and does not need to be specified for each use of --next.
  1129. Providing --fail-early multiple times has no extra effect.
  1130. Disable it again with \-\-no-fail-early.
  1131. Example:
  1132. .nf
  1133. curl --fail-early https://example.com https://two.example
  1134. .fi
  1135. See also \fI-f, \-\-fail\fP and \fI\-\-fail\-with\-body\fP.
  1136. .IP "\-\-fail\-with\-body"
  1137. (HTTP) Return an error on server errors where the HTTP response code is 400 or
  1138. greater). In normal cases when an HTTP server fails to deliver a document, it
  1139. returns an HTML document stating so (which often also describes why and more).
  1140. This option allows curl to output and save that content but also to return
  1141. error 22.
  1142. This is an alternative option to \fI\-f, \-\-fail\fP which makes curl fail for the same
  1143. circumstances but without saving the content.
  1144. Providing --fail-with-body multiple times has no extra effect.
  1145. Disable it again with \-\-no-fail-with-body.
  1146. Example:
  1147. .nf
  1148. curl --fail-with-body https://example.com
  1149. .fi
  1150. This option is mutually exclusive with \fI-f, \-\-fail\fP.
  1151. Added in 7.76.0. See also \fI-f, \-\-fail\fP and \fI\-\-fail\-early\fP.
  1152. .IP "\-\-false\-start"
  1153. (TLS) Use false start during the TLS handshake. False start is a mode where a TLS
  1154. client starts sending application data before verifying the server\(aqs Finished
  1155. message, thus saving a round trip when performing a full handshake.
  1156. This functionality is currently only implemented in the Secure Transport (on
  1157. iOS 7.0 or later, or OS X 10.9 or later) backend.
  1158. Providing --false-start multiple times has no extra effect.
  1159. Disable it again with \-\-no-false-start.
  1160. Example:
  1161. .nf
  1162. curl --false-start https://example.com
  1163. .fi
  1164. See also \fI\-\-tcp\-fastopen\fP.
  1165. .IP "\-F, \-\-form <name=content>"
  1166. (HTTP SMTP IMAP) For the HTTP protocol family, emulate a filled\-in form in which a user has
  1167. pressed the submit button. This makes curl POST data using the Content\-Type
  1168. multipart/form\-data according to RFC 2388.
  1169. For SMTP and IMAP protocols, this composes a multipart mail message to
  1170. transmit.
  1171. This enables uploading of binary files etc. To force the \(aqcontent\(aq part to be
  1172. a file, prefix the filename with an @ sign. To just get the content part from
  1173. a file, prefix the filename with the symbol <. The difference between @ and
  1174. < is then that @ makes a file get attached in the post as a file upload,
  1175. while the < makes a text field and just get the contents for that text field
  1176. from a file.
  1177. Read content from stdin instead of a file by using a single "\-" as filename.
  1178. This goes for both @ and < constructs. When stdin is used, the contents is
  1179. buffered in memory first by curl to determine its size and allow a possible
  1180. resend. Defining a part\(aqs data from a named non\-regular file (such as a named
  1181. pipe or similar) is not subject to buffering and is instead read at
  1182. transmission time; since the full size is unknown before the transfer starts,
  1183. such data is sent as chunks by HTTP and rejected by IMAP.
  1184. Example: send an image to an HTTP server, where \(aqprofile\(aq is the name of the
  1185. form\-field to which the file \fBportrait.jpg\fP is the input:
  1186. .nf
  1187. curl \-F profile=@portrait.jpg https://example.com/upload.cgi
  1188. .fi
  1189. Example: send your name and shoe size in two text fields to the server:
  1190. .nf
  1191. curl \-F name=John \-F shoesize=11 https://example.com/
  1192. .fi
  1193. Example: send your essay in a text field to the server. Send it as a plain
  1194. text field, but get the contents for it from a local file:
  1195. .nf
  1196. curl \-F "story=<hugefile.txt" https://example.com/
  1197. .fi
  1198. You can also instruct curl what Content\-Type to use by using "type=", in a
  1199. manner similar to:
  1200. .nf
  1201. curl \-F "web=@index.html;type=text/html" example.com
  1202. .fi
  1203. or
  1204. .nf
  1205. curl \-F "name=daniel;type=text/foo" example.com
  1206. .fi
  1207. You can also explicitly change the name field of a file upload part by setting
  1208. filename=, like this:
  1209. .nf
  1210. curl \-F "file=@localfile;filename=nameinpost" example.com
  1211. .fi
  1212. If filename/path contains \(aq,\(aq or \(aq;\(aq, it must be quoted by double\-quotes like:
  1213. .nf
  1214. curl \-F "file=@\\"local,file\\";filename=\\"name;in;post\\"" example.com
  1215. .fi
  1216. or
  1217. .nf
  1218. curl \-F \(aqfile=@"local,file";filename="name;in;post"\(aq example.com
  1219. .fi
  1220. Note that if a filename/path is quoted by double\-quotes, any double\-quote
  1221. or backslash within the filename must be escaped by backslash.
  1222. Quoting must also be applied to non\-file data if it contains semicolons,
  1223. leading/trailing spaces or leading double quotes:
  1224. .nf
  1225. curl \-F \(aqcolors="red; green; blue";type=text/x\-myapp\(aq example.com
  1226. .fi
  1227. You can add custom headers to the field by setting headers=, like
  1228. .nf
  1229. curl \-F "submit=OK;headers=\\"X\-submit\-type: OK\\"" example.com
  1230. .fi
  1231. or
  1232. .nf
  1233. curl \-F "submit=OK;headers=@headerfile" example.com
  1234. .fi
  1235. The headers= keyword may appear more that once and above notes about quoting
  1236. apply. When headers are read from a file, Empty lines and lines starting
  1237. with \(aq#\(aq are comments and ignored; each header can be folded by splitting
  1238. between two words and starting the continuation line with a space; embedded
  1239. carriage\-returns and trailing spaces are stripped.
  1240. Here is an example of a header file contents:
  1241. .nf
  1242. # This file contain two headers.
  1243. X\-header\-1: this is a header
  1244. # The following header is folded.
  1245. X\-header\-2: this is
  1246. another header
  1247. .fi
  1248. To support sending multipart mail messages, the syntax is extended as follows:
  1249. - name can be omitted: the equal sign is the first character of the argument,
  1250. - if data starts with \(aq(\(aq, this signals to start a new multipart: it can be
  1251. followed by a content type specification.
  1252. - a multipart can be terminated with a \(aq=)\(aq argument.
  1253. Example: the following command sends an SMTP mime email consisting in an
  1254. inline part in two alternative formats: plain text and HTML. It attaches a
  1255. text file:
  1256. .nf
  1257. curl \-F \(aq=(;type=multipart/alternative\(aq \\
  1258. \-F \(aq=plain text message\(aq \\
  1259. \-F \(aq= <body>HTML message</body>;type=text/html\(aq \\
  1260. \-F \(aq=)\(aq \-F \(aq=@textfile.txt\(aq ... smtp://example.com
  1261. .fi
  1262. Data can be encoded for transfer using encoder=. Available encodings are
  1263. \fIbinary\fP and \fI8bit\fP that do nothing else than adding the corresponding
  1264. Content\-Transfer\-Encoding header, \fI7bit\fP that only rejects 8\-bit characters
  1265. with a transfer error, \fIquoted\-printable\fP and \fIbase64\fP that encodes data
  1266. according to the corresponding schemes, limiting lines length to 76
  1267. characters.
  1268. Example: send multipart mail with a quoted\-printable text message and a
  1269. base64 attached file:
  1270. .nf
  1271. curl \-F \(aq=text message;encoder=quoted\-printable\(aq \\
  1272. \-F \(aq=@localfile;encoder=base64\(aq ... smtp://example.com
  1273. .fi
  1274. See further examples and details in the MANUAL.
  1275. --form can be used several times in a command line
  1276. Example:
  1277. .nf
  1278. curl --form "name=curl" --form "file=@loadthis" https://example.com
  1279. .fi
  1280. This option is mutually exclusive with \fI-d, \-\-data\fP, \fI-I, \-\-head\fP and \fI-T, \-\-upload\-file\fP.
  1281. See also \fI-d, \-\-data\fP, \fI\-\-form\-string\fP and \fI\-\-form\-escape\fP.
  1282. .IP "\-\-form\-escape"
  1283. (HTTP imap smtp) Pass on names of multipart form fields and files using backslash\-escaping
  1284. instead of percent\-encoding.
  1285. If --form-escape is provided several times, the last set value is used.
  1286. Example:
  1287. .nf
  1288. curl --form-escape -F 'field\\name=curl' -F 'file=@load"this' https://example.com
  1289. .fi
  1290. Added in 7.81.0. See also \fI-F, \-\-form\fP.
  1291. .IP "\-\-form\-string <name=string>"
  1292. (HTTP SMTP IMAP) Similar to \fI\-F, \-\-form\fP except that the value string for the named parameter is used
  1293. literally. Leading @ and < characters, and the ";type=" string in the value
  1294. have no special meaning. Use this in preference to \fI\-F, \-\-form\fP if there is any
  1295. possibility that the string value may accidentally trigger the @ or <
  1296. features of \fI\-F, \-\-form\fP.
  1297. --form-string can be used several times in a command line
  1298. Example:
  1299. .nf
  1300. curl --form-string "name=data" https://example.com
  1301. .fi
  1302. See also \fI-F, \-\-form\fP.
  1303. .IP "\-\-ftp\-account <data>"
  1304. (FTP) When an FTP server asks for "account data" after username and password has
  1305. been provided, this data is sent off using the ACCT command.
  1306. If --ftp-account is provided several times, the last set value is used.
  1307. Example:
  1308. .nf
  1309. curl --ftp-account "mr.robot" ftp://example.com/
  1310. .fi
  1311. See also \fI-u, \-\-user\fP.
  1312. .IP "\-\-ftp\-alternative\-to\-user <command>"
  1313. (FTP) If authenticating with the USER and PASS commands fails, send this command.
  1314. When connecting to Tumbleweed\(aqs Secure Transport server over FTPS using a
  1315. client certificate, using "SITE AUTH" tells the server to retrieve the
  1316. username from the certificate.
  1317. If --ftp-alternative-to-user is provided several times, the last set value is used.
  1318. Example:
  1319. .nf
  1320. curl --ftp-alternative-to-user "U53r" ftp://example.com
  1321. .fi
  1322. See also \fI\-\-ftp\-account\fP and \fI-u, \-\-user\fP.
  1323. .IP "\-\-ftp\-create\-dirs"
  1324. (FTP SFTP) When an FTP or SFTP URL/operation uses a path that does not currently exist on
  1325. the server, the standard behavior of curl is to fail. Using this option, curl
  1326. instead attempts to create missing directories.
  1327. Providing --ftp-create-dirs multiple times has no extra effect.
  1328. Disable it again with \-\-no-ftp-create-dirs.
  1329. Example:
  1330. .nf
  1331. curl --ftp-create-dirs -T file ftp://example.com/remote/path/file
  1332. .fi
  1333. See also \fI\-\-create\-dirs\fP.
  1334. .IP "\-\-ftp\-method <method>"
  1335. (FTP) Control what method curl should use to reach a file on an FTP(S)
  1336. server. The method argument should be one of the following alternatives:
  1337. .RS
  1338. .IP multicwd
  1339. Do a single CWD operation for each path part in the given URL. For deep
  1340. hierarchies this means many commands. This is how RFC 1738 says it should be
  1341. done. This is the default but the slowest behavior.
  1342. .IP nocwd
  1343. Do no CWD at all. curl does SIZE, RETR, STOR etc and gives the full path to
  1344. the server for each of these commands. This is the fastest behavior.
  1345. .IP singlecwd
  1346. Do one CWD with the full target directory and then operate on the file
  1347. \&"normally" (like in the multicwd case). This is somewhat more standards
  1348. compliant than "nocwd" but without the full penalty of "multicwd".
  1349. .RE
  1350. .IP
  1351. If --ftp-method is provided several times, the last set value is used.
  1352. Examples:
  1353. .nf
  1354. curl --ftp-method multicwd ftp://example.com/dir1/dir2/file
  1355. curl --ftp-method nocwd ftp://example.com/dir1/dir2/file
  1356. curl --ftp-method singlecwd ftp://example.com/dir1/dir2/file
  1357. .fi
  1358. See also \fI-l, \-\-list\-only\fP.
  1359. .IP "\-\-ftp\-pasv"
  1360. (FTP) Use passive mode for the data connection. Passive is the internal default
  1361. behavior, but using this option can be used to override a previous \fI\-P, \-\-ftp\-port\fP
  1362. option.
  1363. Reversing an enforced passive really is not doable but you must then instead
  1364. enforce the correct \fI\-P, \-\-ftp\-port\fP again.
  1365. Passive mode means that curl tries the EPSV command first and then PASV,
  1366. unless \fI\-\-disable\-epsv\fP is used.
  1367. Providing --ftp-pasv multiple times has no extra effect.
  1368. Disable it again with \-\-no-ftp-pasv.
  1369. Example:
  1370. .nf
  1371. curl --ftp-pasv ftp://example.com/
  1372. .fi
  1373. See also \fI\-\-disable\-epsv\fP.
  1374. .IP "\-P, \-\-ftp\-port <address>"
  1375. (FTP) Reverses the default initiator/listener roles when connecting with FTP. This
  1376. option makes curl use active mode. curl then commands the server to connect
  1377. back to the client\(aqs specified address and port, while passive mode asks the
  1378. server to setup an IP address and port for it to connect to. <address>
  1379. should be one of:
  1380. .RS
  1381. .IP interface
  1382. e.g. \fBeth0\fP to specify which interface\(aqs IP address you want to use (Unix only)
  1383. .IP "IP address"
  1384. e.g. \fB192.168.10.1\fP to specify the exact IP address
  1385. .IP hostname
  1386. e.g. \fBmy.host.domain\fP to specify the machine
  1387. .IP -
  1388. make curl pick the same IP address that is already used for the control
  1389. connection. This is the recommended choice.
  1390. .RE
  1391. .IP
  1392. Disable the use of PORT with \fI\-\-ftp\-pasv\fP. Disable the attempt to use the EPRT
  1393. command instead of PORT by using \fI\-\-disable\-eprt\fP. EPRT is really PORT++.
  1394. You can also append ":[start]\-[end]" to the right of the address, to tell
  1395. curl what TCP port range to use. That means you specify a port range, from a
  1396. lower to a higher number. A single number works as well, but do note that it
  1397. increases the risk of failure since the port may not be available.
  1398. If --ftp-port is provided several times, the last set value is used.
  1399. Examples:
  1400. .nf
  1401. curl -P - ftp:/example.com
  1402. curl -P eth0 ftp:/example.com
  1403. curl -P 192.168.0.2 ftp:/example.com
  1404. .fi
  1405. See also \fI\-\-ftp\-pasv\fP and \fI\-\-disable\-eprt\fP.
  1406. .IP "\-\-ftp\-pret"
  1407. (FTP) Send a PRET command before PASV (and EPSV). Certain FTP servers, mainly
  1408. drftpd, require this non\-standard command for directory listings as well as up
  1409. and downloads in PASV mode.
  1410. Providing --ftp-pret multiple times has no extra effect.
  1411. Disable it again with \-\-no-ftp-pret.
  1412. Example:
  1413. .nf
  1414. curl --ftp-pret ftp://example.com/
  1415. .fi
  1416. See also \fI-P, \-\-ftp\-port\fP and \fI\-\-ftp\-pasv\fP.
  1417. .IP "\-\-ftp\-skip\-pasv\-ip"
  1418. (FTP) Do not use the IP address the server suggests in its response to curl\(aqs PASV
  1419. command when curl connects the data connection. Instead curl reuses the same
  1420. IP address it already uses for the control connection.
  1421. This option is enabled by default (added in 7.74.0).
  1422. This option has no effect if PORT, EPRT or EPSV is used instead of PASV.
  1423. Providing --ftp-skip-pasv-ip multiple times has no extra effect.
  1424. Disable it again with \-\-no-ftp-skip-pasv-ip.
  1425. Example:
  1426. .nf
  1427. curl --ftp-skip-pasv-ip ftp://example.com/
  1428. .fi
  1429. See also \fI\-\-ftp\-pasv\fP.
  1430. .IP "\-\-ftp\-ssl\-ccc"
  1431. (FTP) Use CCC (Clear Command Channel) Shuts down the SSL/TLS layer after
  1432. authenticating. The rest of the control channel communication is be
  1433. unencrypted. This allows NAT routers to follow the FTP transaction. The
  1434. default mode is passive.
  1435. Providing --ftp-ssl-ccc multiple times has no extra effect.
  1436. Disable it again with \-\-no-ftp-ssl-ccc.
  1437. Example:
  1438. .nf
  1439. curl --ftp-ssl-ccc ftps://example.com/
  1440. .fi
  1441. See also \fI\-\-ssl\fP and \fI\-\-ftp\-ssl\-ccc\-mode\fP.
  1442. .IP "\-\-ftp\-ssl\-ccc\-mode <active/passive>"
  1443. (FTP) Sets the CCC mode. The passive mode does not initiate the shutdown, but
  1444. instead waits for the server to do it, and does not reply to the shutdown from
  1445. the server. The active mode initiates the shutdown and waits for a reply from
  1446. the server.
  1447. Providing --ftp-ssl-ccc-mode multiple times has no extra effect.
  1448. Disable it again with \-\-no-ftp-ssl-ccc-mode.
  1449. Example:
  1450. .nf
  1451. curl --ftp-ssl-ccc-mode active --ftp-ssl-ccc ftps://example.com/
  1452. .fi
  1453. See also \fI\-\-ftp\-ssl\-ccc\fP.
  1454. .IP "\-\-ftp\-ssl\-control"
  1455. (FTP) Require SSL/TLS for the FTP login, clear for transfer. Allows secure
  1456. authentication, but non\-encrypted data transfers for efficiency. Fails the
  1457. transfer if the server does not support SSL/TLS.
  1458. Providing --ftp-ssl-control multiple times has no extra effect.
  1459. Disable it again with \-\-no-ftp-ssl-control.
  1460. Example:
  1461. .nf
  1462. curl --ftp-ssl-control ftp://example.com
  1463. .fi
  1464. See also \fI\-\-ssl\fP.
  1465. .IP "\-G, \-\-get"
  1466. (HTTP) When used, this option makes all data specified with \fI\-d, \-\-data\fP, \fI\-\-data\-binary\fP or
  1467. \fI\-\-data\-urlencode\fP to be used in an HTTP GET request instead of the POST request
  1468. that otherwise would be used. curl appends the provided data to the URL as a
  1469. query string.
  1470. If used in combination with \fI\-I, \-\-head\fP, the POST data is instead appended to the
  1471. URL with a HEAD request.
  1472. Providing --get multiple times has no extra effect.
  1473. Disable it again with \-\-no-get.
  1474. Examples:
  1475. .nf
  1476. curl --get https://example.com
  1477. curl --get -d "tool=curl" -d "age=old" https://example.com
  1478. curl --get -I -d "tool=curl" https://example.com
  1479. .fi
  1480. See also \fI-d, \-\-data\fP and \fI-X, \-\-request\fP.
  1481. .IP "\-g, \-\-globoff"
  1482. Switch off the URL globbing function. When you set this option, you can
  1483. specify URLs that contain the letters {}[] without having curl itself
  1484. interpret them. Note that these letters are not normal legal URL contents but
  1485. they should be encoded according to the URI standard.
  1486. Providing --globoff multiple times has no extra effect.
  1487. Disable it again with \-\-no-globoff.
  1488. Example:
  1489. .nf
  1490. curl -g "https://example.com/{[]}}}}"
  1491. .fi
  1492. See also \fI-K, \-\-config\fP and \fI-q, \-\-disable\fP.
  1493. .IP "\-\-happy\-eyeballs\-timeout\-ms <ms>"
  1494. Happy Eyeballs is an algorithm that attempts to connect to both IPv4 and IPv6
  1495. addresses for dual\-stack hosts, giving IPv6 a head\-start of the specified
  1496. number of milliseconds. If the IPv6 address cannot be connected to within that
  1497. time, then a connection attempt is made to the IPv4 address in parallel. The
  1498. first connection to be established is the one that is used.
  1499. The range of suggested useful values is limited. Happy Eyeballs RFC 6555 says
  1500. \&"It is RECOMMENDED that connection attempts be paced 150\-250 ms apart to
  1501. balance human factors against network load." libcurl currently defaults to
  1502. 200 ms. Firefox and Chrome currently default to 300 ms.
  1503. If --happy-eyeballs-timeout-ms is provided several times, the last set value is used.
  1504. Example:
  1505. .nf
  1506. curl --happy-eyeballs-timeout-ms 500 https://example.com
  1507. .fi
  1508. See also \fI-m, \-\-max\-time\fP and \fI\-\-connect\-timeout\fP.
  1509. .IP "\-\-haproxy\-clientip <ip>"
  1510. (HTTP) Sets a client IP in HAProxy PROXY protocol v1 header at the beginning of the
  1511. connection.
  1512. For valid requests, IPv4 addresses must be indicated as a series of exactly
  1513. 4 integers in the range [0..255] inclusive written in decimal representation
  1514. separated by exactly one dot between each other. Heading zeroes are not
  1515. permitted in front of numbers in order to avoid any possible confusion
  1516. with octal numbers. IPv6 addresses must be indicated as series of 4 hexadecimal
  1517. digits (upper or lower case) delimited by colons between each other, with the
  1518. acceptance of one double colon sequence to replace the largest acceptable range
  1519. of consecutive zeroes. The total number of decoded bits must exactly be 128.
  1520. Otherwise, any string can be accepted for the client IP and get sent.
  1521. It replaces \fI\-\-haproxy\-protocol\fP if used, it is not necessary to specify both flags.
  1522. If --haproxy-clientip is provided several times, the last set value is used.
  1523. Example:
  1524. .nf
  1525. curl --haproxy-clientip $IP
  1526. .fi
  1527. Added in 8.2.0. See also \fI-x, \-\-proxy\fP.
  1528. .IP "\-\-haproxy\-protocol"
  1529. (HTTP) Send a HAProxy PROXY protocol v1 header at the beginning of the connection.
  1530. This is used by some load balancers and reverse proxies to indicate the
  1531. client\(aqs true IP address and port.
  1532. This option is primarily useful when sending test requests to a service that
  1533. expects this header.
  1534. Providing --haproxy-protocol multiple times has no extra effect.
  1535. Disable it again with \-\-no-haproxy-protocol.
  1536. Example:
  1537. .nf
  1538. curl --haproxy-protocol https://example.com
  1539. .fi
  1540. Added in 7.60.0. See also \fI-x, \-\-proxy\fP.
  1541. .IP "\-I, \-\-head"
  1542. (HTTP FTP FILE) Fetch the headers only! HTTP\-servers feature the command HEAD which this uses
  1543. to get nothing but the header of a document. When used on an FTP or FILE file,
  1544. curl displays the file size and last modification time only.
  1545. Providing --head multiple times has no extra effect.
  1546. Disable it again with \-\-no-head.
  1547. Example:
  1548. .nf
  1549. curl -I https://example.com
  1550. .fi
  1551. See also \fI-G, \-\-get\fP, \fI-v, \-\-verbose\fP and \fI\-\-trace\-ascii\fP.
  1552. .IP "\-H, \-\-header <header/@file>"
  1553. (HTTP IMAP SMTP) Extra header to include in information sent. When used within an HTTP request,
  1554. it is added to the regular request headers.
  1555. For an IMAP or SMTP MIME uploaded mail built with \fI\-F, \-\-form\fP options, it is
  1556. prepended to the resulting MIME document, effectively including it at the mail
  1557. global level. It does not affect raw uploaded mails.
  1558. You may specify any number of extra headers. Note that if you should add a
  1559. custom header that has the same name as one of the internal ones curl would
  1560. use, your externally set header is used instead of the internal one. This
  1561. allows you to make even trickier stuff than curl would normally do. You should
  1562. not replace internally set headers without knowing perfectly well what you are
  1563. doing. Remove an internal header by giving a replacement without content on
  1564. the right side of the colon, as in: \-H "Host:". If you send the custom header
  1565. with no\-value then its header must be terminated with a semicolon, such as \-H
  1566. \&"X\-Custom\-Header;" to send "X\-Custom\-Header:".
  1567. curl makes sure that each header you add/replace is sent with the proper
  1568. end\-of\-line marker, you should thus \fBnot\fP add that as a part of the header
  1569. content: do not add newlines or carriage returns, they only mess things up for
  1570. you. curl passes on the verbatim string you give it without any filter or
  1571. other safe guards. That includes white space and control characters.
  1572. This option can take an argument in @filename style, which then adds a header
  1573. for each line in the input file. Using @\- makes curl read the header file from
  1574. stdin.
  1575. Please note that most anti\-spam utilities check the presence and value of
  1576. several MIME mail headers: these are "From:", "To:", "Date:" and "Subject:"
  1577. among others and should be added with this option.
  1578. You need \fI\-\-proxy\-header\fP to send custom headers intended for an HTTP proxy.
  1579. Passing on a "Transfer\-Encoding: chunked" header when doing an HTTP request
  1580. with a request body, makes curl send the data using chunked encoding.
  1581. \fBWARNING\fP: headers set with this option are set in all HTTP requests \- even
  1582. after redirects are followed, like when told with \fI\-L, \-\-location\fP. This can lead to
  1583. the header being sent to other hosts than the original host, so sensitive
  1584. headers should be used with caution combined with following redirects.
  1585. --header can be used several times in a command line
  1586. Examples:
  1587. .nf
  1588. curl -H "X-First-Name: Joe" https://example.com
  1589. curl -H "User-Agent: yes-please/2000" https://example.com
  1590. curl -H "Host:" https://example.com
  1591. curl -H @headers.txt https://example.com
  1592. .fi
  1593. See also \fI-A, \-\-user\-agent\fP and \fI-e, \-\-referer\fP.
  1594. .IP "\-h, \-\-help <category>"
  1595. Usage help. List all curl command line options within the given \fBcategory\fP.
  1596. If no argument is provided, curl displays the most important command line
  1597. arguments.
  1598. For category \fBall\fP, curl displays help for all options.
  1599. If \fBcategory\fP is specified, curl displays all available help categories.
  1600. Example:
  1601. .nf
  1602. curl --help all
  1603. .fi
  1604. See also \fI-v, \-\-verbose\fP.
  1605. .IP "\-\-hostpubmd5 <md5>"
  1606. (SFTP SCP) Pass a string containing 32 hexadecimal digits. The string should be the 128
  1607. bit \fBMD5\fP checksum of the remote host\(aqs public key, curl refuses the
  1608. connection with the host unless the checksums match.
  1609. If --hostpubmd5 is provided several times, the last set value is used.
  1610. Example:
  1611. .nf
  1612. curl --hostpubmd5 e5c1c49020640a5ab0f2034854c321a8 sftp://example.com/
  1613. .fi
  1614. See also \fI\-\-hostpubsha256\fP.
  1615. .IP "\-\-hostpubsha256 <sha256>"
  1616. (SFTP SCP) Pass a string containing a Base64\-encoded SHA256 hash of the remote host\(aqs
  1617. public key. Curl refuses the connection with the host unless the hashes match.
  1618. This feature requires libcurl to be built with libssh2 and does not work with
  1619. other SSH backends.
  1620. If --hostpubsha256 is provided several times, the last set value is used.
  1621. Example:
  1622. .nf
  1623. curl --hostpubsha256 NDVkMTQxMGQ1ODdmMjQ3MjczYjAyOTY5MmRkMjVmNDQ= sftp://example.com/
  1624. .fi
  1625. Added in 7.80.0. See also \fI\-\-hostpubmd5\fP.
  1626. .IP "\-\-hsts <filename>"
  1627. (HTTPS) Enable HSTS for the transfer. If the filename points to an existing HSTS cache
  1628. file, that is used. After a completed transfer, the cache is saved to the
  1629. filename again if it has been modified.
  1630. If curl is told to use HTTP:// for a transfer involving a hostname that exists
  1631. in the HSTS cache, it upgrades the transfer to use HTTPS. Each HSTS cache
  1632. entry has an individual life time after which the upgrade is no longer
  1633. performed.
  1634. Specify a "" filename (zero length) to avoid loading/saving and make curl just
  1635. handle HSTS in memory.
  1636. If this option is used several times, curl loads contents from all the
  1637. files but the last one is used for saving.
  1638. --hsts can be used several times in a command line
  1639. Example:
  1640. .nf
  1641. curl --hsts cache.txt https://example.com
  1642. .fi
  1643. Added in 7.74.0. See also \fI\-\-proto\fP.
  1644. .IP "\-\-http0.9"
  1645. (HTTP) Accept an HTTP version 0.9 response.
  1646. HTTP/0.9 is a response without headers and therefore you can also connect with
  1647. this to non\-HTTP servers and still get a response since curl simply
  1648. transparently downgrades \- if allowed.
  1649. HTTP/0.9 is disabled by default (added in 7.66.0)
  1650. Providing --http0.9 multiple times has no extra effect.
  1651. Disable it again with \-\-no-http0.9.
  1652. Example:
  1653. .nf
  1654. curl --http0.9 https://example.com
  1655. .fi
  1656. Added in 7.64.0. See also \fI\-\-http1.1\fP, \fI\-\-http2\fP and \fI\-\-http3\fP.
  1657. .IP "\-0, \-\-http1.0"
  1658. (HTTP) Use HTTP version 1.0 instead of using its internally preferred HTTP version.
  1659. Providing --http1.0 multiple times has no extra effect.
  1660. Example:
  1661. .nf
  1662. curl --http1.0 https://example.com
  1663. .fi
  1664. This option is mutually exclusive with \fI\-\-http1.1\fP, \fI\-\-http2\fP, \fI\-\-http2\-prior\-knowledge\fP and \fI\-\-http3\fP.
  1665. See also \fI\-\-http0.9\fP and \fI\-\-http1.1\fP.
  1666. .IP "\-\-http1.1"
  1667. (HTTP) Use HTTP version 1.1. This is the default with HTTP:// URLs.
  1668. Providing --http1.1 multiple times has no extra effect.
  1669. Example:
  1670. .nf
  1671. curl --http1.1 https://example.com
  1672. .fi
  1673. This option is mutually exclusive with \fI\-\-http1.0\fP, \fI\-\-http2\fP, \fI\-\-http2\-prior\-knowledge\fP and \fI\-\-http3\fP.
  1674. See also \fI\-\-http1.0\fP and \fI\-\-http0.9\fP.
  1675. .IP "\-\-http2"
  1676. (HTTP) Use HTTP/2.
  1677. For HTTPS, this means curl negotiates HTTP/2 in the TLS handshake. curl does
  1678. this by default.
  1679. For HTTP, this means curl attempts to upgrade the request to HTTP/2 using the
  1680. Upgrade: request header.
  1681. When curl uses HTTP/2 over HTTPS, it does not itself insist on TLS 1.2 or
  1682. higher even though that is required by the specification. A user can add this
  1683. version requirement with \fI\-\-tlsv1.2\fP.
  1684. Providing --http2 multiple times has no extra effect.
  1685. Example:
  1686. .nf
  1687. curl --http2 https://example.com
  1688. .fi
  1689. \fI\-\-http2\fP requires that libcurl is built to support HTTP/2.
  1690. This option is mutually exclusive with \fI\-\-http1.1\fP, \fI\-\-http1.0\fP, \fI\-\-http2\-prior\-knowledge\fP and \fI\-\-http3\fP.
  1691. See also \fI\-\-http1.1\fP, \fI\-\-http3\fP and \fI\-\-no\-alpn\fP.
  1692. .IP "\-\-http2\-prior\-knowledge"
  1693. (HTTP) Issue a non\-TLS HTTP requests using HTTP/2 directly without HTTP/1.1 Upgrade.
  1694. It requires prior knowledge that the server supports HTTP/2 straight away.
  1695. HTTPS requests still do HTTP/2 the standard way with negotiated protocol
  1696. version in the TLS handshake.
  1697. Providing --http2-prior-knowledge multiple times has no extra effect.
  1698. Disable it again with \-\-no-http2-prior-knowledge.
  1699. Example:
  1700. .nf
  1701. curl --http2-prior-knowledge https://example.com
  1702. .fi
  1703. \fI\-\-http2\-prior\-knowledge\fP requires that libcurl is built to support HTTP/2.
  1704. This option is mutually exclusive with \fI\-\-http1.1\fP, \fI\-\-http1.0\fP, \fI\-\-http2\fP and \fI\-\-http3\fP.
  1705. See also \fI\-\-http2\fP and \fI\-\-http3\fP.
  1706. .IP "\-\-http3"
  1707. (HTTP) Attempt HTTP/3 to the host in the URL, but fallback to earlier HTTP versions
  1708. if the HTTP/3 connection establishment fails. HTTP/3 is only available for
  1709. HTTPS and not for HTTP URLs.
  1710. This option allows a user to avoid using the Alt\-Svc method of upgrading to
  1711. HTTP/3 when you know that the target speaks HTTP/3 on the given host and port.
  1712. When asked to use HTTP/3, curl issues a separate attempt to use older HTTP
  1713. versions with a slight delay, so if the HTTP/3 transfer fails or is slow, curl
  1714. still tries to proceed with an older HTTP version.
  1715. Use \fI\-\-http3\-only\fP for similar functionality \fIwithout\fP a fallback.
  1716. Providing --http3 multiple times has no extra effect.
  1717. Example:
  1718. .nf
  1719. curl --http3 https://example.com
  1720. .fi
  1721. \fI\-\-http3\fP requires that libcurl is built to support HTTP/3.
  1722. This option is mutually exclusive with \fI\-\-http1.1\fP, \fI\-\-http1.0\fP, \fI\-\-http2\fP, \fI\-\-http2\-prior\-knowledge\fP and \fI\-\-http3\-only\fP.
  1723. Added in 7.66.0. See also \fI\-\-http1.1\fP and \fI\-\-http2\fP.
  1724. .IP "\-\-http3\-only"
  1725. (HTTP) Instructs curl to use HTTP/3 to the host in the URL, with no fallback to
  1726. earlier HTTP versions. HTTP/3 can only be used for HTTPS and not for HTTP
  1727. URLs. For HTTP, this option triggers an error.
  1728. This option allows a user to avoid using the Alt\-Svc method of upgrading to
  1729. HTTP/3 when you know that the target speaks HTTP/3 on the given host and port.
  1730. This option makes curl fail if a QUIC connection cannot be established, it
  1731. does not attempt any other HTTP versions on its own. Use \fI\-\-http3\fP for similar
  1732. functionality \fIwith\fP a fallback.
  1733. Providing --http3-only multiple times has no extra effect.
  1734. Example:
  1735. .nf
  1736. curl --http3-only https://example.com
  1737. .fi
  1738. \fI\-\-http3\-only\fP requires that libcurl is built to support HTTP/3.
  1739. This option is mutually exclusive with \fI\-\-http1.1\fP, \fI\-\-http1.0\fP, \fI\-\-http2\fP, \fI\-\-http2\-prior\-knowledge\fP and \fI\-\-http3\fP.
  1740. Added in 7.88.0. See also \fI\-\-http1.1\fP, \fI\-\-http2\fP and \fI\-\-http3\fP.
  1741. .IP "\-\-ignore\-content\-length"
  1742. (FTP HTTP) For HTTP, Ignore the Content\-Length header. This is particularly useful for
  1743. servers running Apache 1.x, which reports incorrect Content\-Length for
  1744. files larger than 2 gigabytes.
  1745. For FTP, this makes curl skip the SIZE command to figure out the size before
  1746. downloading a file.
  1747. This option does not work for HTTP if libcurl was built to use hyper.
  1748. Providing --ignore-content-length multiple times has no extra effect.
  1749. Disable it again with \-\-no-ignore-content-length.
  1750. Example:
  1751. .nf
  1752. curl --ignore-content-length https://example.com
  1753. .fi
  1754. See also \fI\-\-ftp\-skip\-pasv\-ip\fP.
  1755. .IP "\-i, \-\-include"
  1756. (HTTP FTP) Include response headers in the output. HTTP response headers can include
  1757. things like server name, cookies, date of the document, HTTP version and
  1758. more... With non\-HTTP protocols, the "headers" are other server communication.
  1759. To view the request headers, consider the \fI\-v, \-\-verbose\fP option.
  1760. Providing --include multiple times has no extra effect.
  1761. Disable it again with \-\-no-include.
  1762. Example:
  1763. .nf
  1764. curl -i https://example.com
  1765. .fi
  1766. See also \fI-v, \-\-verbose\fP.
  1767. .IP "\-k, \-\-insecure"
  1768. (TLS SFTP SCP) By default, every secure connection curl makes is verified to be secure before
  1769. the transfer takes place. This option makes curl skip the verification step
  1770. and proceed without checking.
  1771. When this option is not used for protocols using TLS, curl verifies the
  1772. server\(aqs TLS certificate before it continues: that the certificate contains
  1773. the right name which matches the hostname used in the URL and that the
  1774. certificate has been signed by a CA certificate present in the cert store. See
  1775. this online resource for further details:
  1776. \fBhttps://curl.se/docs/sslcerts.html\fP
  1777. For SFTP and SCP, this option makes curl skip the \fIknown_hosts\fP verification.
  1778. \fIknown_hosts\fP is a file normally stored in the user\(aqs home directory in the
  1779. \&".ssh" subdirectory, which contains hostnames and their public keys.
  1780. \fBWARNING\fP: using this option makes the transfer insecure.
  1781. When curl uses secure protocols it trusts responses and allows for example
  1782. HSTS and Alt\-Svc information to be stored and used subsequently. Using
  1783. \fI\-k, \-\-insecure\fP can make curl trust and use such information from malicious
  1784. servers.
  1785. Providing --insecure multiple times has no extra effect.
  1786. Disable it again with \-\-no-insecure.
  1787. Example:
  1788. .nf
  1789. curl --insecure https://example.com
  1790. .fi
  1791. See also \fI\-\-proxy\-insecure\fP, \fI\-\-cacert\fP and \fI\-\-capath\fP.
  1792. .IP "\-\-interface <name>"
  1793. Perform the operation using a specified interface. You can enter interface
  1794. name, IP address or hostname. If you prefer to be specific, you can use the
  1795. following special syntax:
  1796. .RS
  1797. .IP if!<name>
  1798. Interface name. If the provided name does not match an existing interface,
  1799. curl returns with error 45.
  1800. .IP host!<name>
  1801. IP address or hostname.
  1802. .IP ifhost!<interface>!<host>
  1803. Interface name and IP address or hostname. This syntax requires libcurl 8.9.0
  1804. or later.
  1805. If the provided name does not match an existing interface, curl returns with
  1806. error 45.
  1807. .RE
  1808. .IP
  1809. curl does not support using network interface names for this option on
  1810. Windows.
  1811. That name resolve operation if a hostname is provided does \fBnot\fP use
  1812. DNS\-over\-HTTPS even if \fI\-\-doh\-url\fP is set.
  1813. On Linux this option can be used to specify a \fBVRF\fP (Virtual Routing and
  1814. Forwarding) device, but the binary then needs to either have the
  1815. \fBCAP_NET_RAW\fP capability set or to be run as root.
  1816. If --interface is provided several times, the last set value is used.
  1817. Examples:
  1818. .nf
  1819. curl --interface eth0 https://example.com
  1820. curl --interface "host!10.0.0.1" https://example.com
  1821. curl --interface "if!enp3s0" https://example.com
  1822. .fi
  1823. See also \fI\-\-dns\-interface\fP.
  1824. .IP "\-\-ip\-tos <string>"
  1825. (All) Set Type of Service (TOS) for IPv4 or Traffic Class for IPv6.
  1826. The values allowed for <string> can be a numeric value between 1 and 255
  1827. or one of the following:
  1828. CS0, CS1, CS2, CS3, CS4, CS5, CS6, CS7, AF11, AF12, AF13, AF21, AF22, AF23,
  1829. AF31, AF32, AF33, AF41, AF42, AF43, EF, VOICE\-ADMIT, ECT1, ECT0, CE, LE,
  1830. LOWCOST, LOWDELAY, THROUGHPUT, RELIABILITY, MINCOST
  1831. If --ip-tos is provided several times, the last set value is used.
  1832. Example:
  1833. .nf
  1834. curl --ip-tos CS5 https://example.com
  1835. .fi
  1836. Added in 8.9.0. See also \fI\-\-tcp\-nodelay\fP and \fI\-\-vlan\-priority\fP.
  1837. .IP "\-\-ipfs\-gateway <URL>"
  1838. (IPFS) Specify which gateway to use for IPFS and IPNS URLs. Not specifying this
  1839. instead makes curl check if the IPFS_GATEWAY environment variable is set, or
  1840. if a "~/.ipfs/gateway" file holding the gateway URL exists.
  1841. If you run a local IPFS node, this gateway is by default available under
  1842. \&"http://localhost:8080". A full example URL would look like:
  1843. .nf
  1844. curl \--ipfs\-gateway http://localhost:8080 ipfs://bafybeigagd5nmnn2iys2f3doro7ydrevyr2mzarwidgadawmamiteydbzi
  1845. .fi
  1846. There are many public IPFS gateways. See for example:
  1847. https://ipfs.github.io/public\-gateway\-checker/
  1848. If you opt to go for a remote gateway you need to be aware that you completely
  1849. trust the gateway. This might be fine in local gateways that you host
  1850. yourself. With remote gateways there could potentially be malicious actors
  1851. returning you data that does not match the request you made, inspect or even
  1852. interfere with the request. You may not notice this when using curl. A
  1853. mitigation could be to go for a "trustless" gateway. This means you locally
  1854. verify that the data. Consult the docs page on trusted vs trustless:
  1855. https://docs.ipfs.tech/reference/http/gateway/#trusted\-vs\-trustless
  1856. If --ipfs-gateway is provided several times, the last set value is used.
  1857. Example:
  1858. .nf
  1859. curl --ipfs-gateway https://example.com ipfs://
  1860. .fi
  1861. Added in 8.4.0. See also \fI-h, \-\-help\fP and \fI-M, \-\-manual\fP.
  1862. .IP "\-4, \-\-ipv4"
  1863. Use IPv4 addresses only when resolving hostnames, and not for example try
  1864. IPv6.
  1865. Providing --ipv4 multiple times has no extra effect.
  1866. Example:
  1867. .nf
  1868. curl --ipv4 https://example.com
  1869. .fi
  1870. This option is mutually exclusive with \fI-6, \-\-ipv6\fP.
  1871. See also \fI\-\-http1.1\fP and \fI\-\-http2\fP.
  1872. .IP "\-6, \-\-ipv6"
  1873. Use IPv6 addresses only when resolving hostnames, and not for example try
  1874. IPv4.
  1875. Your resolver may respond to an IPv6\-only resolve request by returning IPv6
  1876. addresses that contain "mapped" IPv4 addresses for compatibility purposes.
  1877. macOS is known to do this.
  1878. Providing --ipv6 multiple times has no extra effect.
  1879. Example:
  1880. .nf
  1881. curl --ipv6 https://example.com
  1882. .fi
  1883. This option is mutually exclusive with \fI-4, \-\-ipv4\fP.
  1884. See also \fI\-\-http1.1\fP and \fI\-\-http2\fP.
  1885. .IP "\-\-json <data>"
  1886. (HTTP) Sends the specified JSON data in a POST request to the HTTP server. \fI\-\-json\fP
  1887. works as a shortcut for passing on these three options:
  1888. .nf
  1889. -\-data [arg]
  1890. -\-header "Content\-Type: application/json"
  1891. -\-header "Accept: application/json"
  1892. .fi
  1893. There is \fBno verification\fP that the passed in data is actual JSON or that
  1894. the syntax is correct.
  1895. If you start the data with the letter @, the rest should be a filename to read
  1896. the data from, or a single dash (\-) if you want curl to read the data from
  1897. stdin. Posting data from a file named \(aqfoobar\(aq would thus be done with \fI\-\-json\fP
  1898. @foobar and to instead read the data from stdin, use \fI\-\-json\fP @\-.
  1899. If this option is used more than once on the same command line, the additional
  1900. data pieces are concatenated to the previous before sending.
  1901. The headers this option sets can be overridden with \fI\-H, \-\-header\fP as usual.
  1902. --json can be used several times in a command line
  1903. Examples:
  1904. .nf
  1905. curl --json '{ "drink": "coffe" }' https://example.com
  1906. curl --json '{ "drink":' --json ' "coffe" }' https://example.com
  1907. curl --json @prepared https://example.com
  1908. curl --json @- https://example.com < json.txt
  1909. .fi
  1910. This option is mutually exclusive with \fI-F, \-\-form\fP, \fI-I, \-\-head\fP and \fI-T, \-\-upload\-file\fP.
  1911. Added in 7.82.0. See also \fI\-\-data\-binary\fP and \fI\-\-data\-raw\fP.
  1912. .IP "\-j, \-\-junk\-session\-cookies"
  1913. (HTTP) When curl is told to read cookies from a given file, this option makes it
  1914. discard all "session cookies". This has the same effect as if a new session is
  1915. started. Typical browsers discard session cookies when they are closed down.
  1916. Providing --junk-session-cookies multiple times has no extra effect.
  1917. Disable it again with \-\-no-junk-session-cookies.
  1918. Example:
  1919. .nf
  1920. curl --junk-session-cookies -b cookies.txt https://example.com
  1921. .fi
  1922. See also \fI-b, \-\-cookie\fP and \fI-c, \-\-cookie\-jar\fP.
  1923. .IP "\-\-keepalive\-cnt <integer>"
  1924. Set the maximum number of keepalive probes TCP should send but get no response
  1925. before dropping the connection. This option is usually used in conjunction
  1926. with \fI\-\-keepalive\-time\fP.
  1927. This option is supported on Linux, *BSD/macOS, Windows >=10.0.16299, Solaris
  1928. 11.4, and recent AIX, HP\-UX and more. This option has no effect if
  1929. \fI\-\-no\-keepalive\fP is used.
  1930. If unspecified, the option defaults to 9.
  1931. If --keepalive-cnt is provided several times, the last set value is used.
  1932. Example:
  1933. .nf
  1934. curl --keepalive-cnt 3 https://example.com
  1935. .fi
  1936. Added in 8.9.0. See also \fI\-\-keepalive\-time\fP and \fI\-\-no\-keepalive\fP.
  1937. .IP "\-\-keepalive\-time <seconds>"
  1938. Set the time a connection needs to remain idle before sending keepalive probes
  1939. and the time between individual keepalive probes. It is currently effective on
  1940. operating systems offering the "TCP_KEEPIDLE" and "TCP_KEEPINTVL" socket
  1941. options (meaning Linux, *BSD/macOS, Windows, Solaris, and recent AIX, HP\-UX and more).
  1942. Keepalive is used by the TCP stack to detect broken networks on idle connections.
  1943. The number of missed keepalive probes before declaring the connection down is OS
  1944. dependent and is commonly 8 (*BSD/macOS/AIX), 9 (Linux/AIX) or 5/10 (Windows), and
  1945. this number can be changed by specifying the curl option "keepalive\-cnt".
  1946. Note that this option has no effect if \fI\-\-no\-keepalive\fP is used.
  1947. If unspecified, the option defaults to 60 seconds.
  1948. If --keepalive-time is provided several times, the last set value is used.
  1949. Example:
  1950. .nf
  1951. curl --keepalive-time 20 https://example.com
  1952. .fi
  1953. See also \fI\-\-no\-keepalive\fP, \fI\-\-keepalive\-cnt\fP and \fI-m, \-\-max\-time\fP.
  1954. .IP "\-\-key <key>"
  1955. (TLS SSH) Private key filename. Allows you to provide your private key in this separate
  1956. file. For SSH, if not specified, curl tries the following candidates in order:
  1957. \&"~/.ssh/id_rsa", "~/.ssh/id_dsa", "./id_rsa", "./id_dsa".
  1958. If curl is built against OpenSSL library, and the engine pkcs11 is available,
  1959. then a PKCS#11 URI (RFC 7512) can be used to specify a private key located in
  1960. a PKCS#11 device. A string beginning with "pkcs11:" is interpreted as a
  1961. PKCS#11 URI. If a PKCS#11 URI is provided, then the \fI\-\-engine\fP option is set as
  1962. \&"pkcs11" if none was provided and the \fI\-\-key\-type\fP option is set as "ENG" if
  1963. none was provided.
  1964. If curl is built against Secure Transport or Schannel then this option is
  1965. ignored for TLS protocols (HTTPS, etc). Those backends expect the private key
  1966. to be already present in the keychain or PKCS#12 file containing the
  1967. certificate.
  1968. If --key is provided several times, the last set value is used.
  1969. Example:
  1970. .nf
  1971. curl --cert certificate --key here https://example.com
  1972. .fi
  1973. See also \fI\-\-key\-type\fP and \fI-E, \-\-cert\fP.
  1974. .IP "\-\-key\-type <type>"
  1975. (TLS) Private key file type. Specify which type your \fI\-\-key\fP provided private key
  1976. is. DER, PEM, and ENG are supported. If not specified, PEM is assumed.
  1977. If --key-type is provided several times, the last set value is used.
  1978. Example:
  1979. .nf
  1980. curl --key-type DER --key here https://example.com
  1981. .fi
  1982. See also \fI\-\-key\fP.
  1983. .IP "\-\-krb <level>"
  1984. (FTP) Enable Kerberos authentication and use. The level must be entered and should
  1985. be one of \(aqclear\(aq, \(aqsafe\(aq, \(aqconfidential\(aq, or \(aqprivate\(aq. Should you use a
  1986. level that is not one of these, \(aqprivate\(aq is used.
  1987. If --krb is provided several times, the last set value is used.
  1988. Example:
  1989. .nf
  1990. curl --krb clear ftp://example.com/
  1991. .fi
  1992. \fI\-\-krb\fP requires that libcurl is built to support Kerberos.
  1993. See also \fI\-\-delegation\fP and \fI\-\-ssl\fP.
  1994. .IP "\-\-libcurl <file>"
  1995. Append this option to any ordinary curl command line, and you get
  1996. libcurl\-using C source code written to the file that does the equivalent of
  1997. what your command\-line operation does!
  1998. This option is global and does not need to be specified for each use of --next.
  1999. If --libcurl is provided several times, the last set value is used.
  2000. Example:
  2001. .nf
  2002. curl --libcurl client.c https://example.com
  2003. .fi
  2004. See also \fI-v, \-\-verbose\fP.
  2005. .IP "\-\-limit\-rate <speed>"
  2006. Specify the maximum transfer rate you want curl to use \- for both downloads
  2007. and uploads. This feature is useful if you have a limited pipe and you would
  2008. like your transfer not to use your entire bandwidth. To make it slower than it
  2009. otherwise would be.
  2010. The given speed is measured in bytes/second, unless a suffix is appended.
  2011. Appending \(aqk\(aq or \(aqK\(aq counts the number as kilobytes, \(aqm\(aq or \(aqM\(aq makes it
  2012. megabytes, while \(aqg\(aq or \(aqG\(aq makes it gigabytes. The suffixes (k, M, G, T, P)
  2013. are 1024 based. For example 1k is 1024. Examples: 200K, 3m and 1G.
  2014. The rate limiting logic works on averaging the transfer speed to no more than
  2015. the set threshold over a period of multiple seconds.
  2016. If you also use the \fI\-Y, \-\-speed\-limit\fP option, that option takes precedence and
  2017. might cripple the rate\-limiting slightly, to help keeping the speed\-limit
  2018. logic working.
  2019. If --limit-rate is provided several times, the last set value is used.
  2020. Examples:
  2021. .nf
  2022. curl --limit-rate 100K https://example.com
  2023. curl --limit-rate 1000 https://example.com
  2024. curl --limit-rate 10M https://example.com
  2025. .fi
  2026. See also \fI\-\-rate\fP, \fI-Y, \-\-speed\-limit\fP and \fI-y, \-\-speed\-time\fP.
  2027. .IP "\-l, \-\-list\-only"
  2028. (FTP POP3 SFTP FILE) When listing an FTP directory, force a name\-only view. Maybe particularly
  2029. useful if the user wants to machine\-parse the contents of an FTP directory
  2030. since the normal directory view does not use a standard look or format. When
  2031. used like this, the option causes an NLST command to be sent to the server
  2032. instead of LIST.
  2033. Note: Some FTP servers list only files in their response to NLST; they do not
  2034. include sub\-directories and symbolic links.
  2035. When listing an SFTP directory, this switch forces a name\-only view, one per
  2036. line. This is especially useful if the user wants to machine\-parse the
  2037. contents of an SFTP directory since the normal directory view provides more
  2038. information than just filenames.
  2039. When retrieving a specific email from POP3, this switch forces a LIST command
  2040. to be performed instead of RETR. This is particularly useful if the user wants
  2041. to see if a specific message\-id exists on the server and what size it is.
  2042. For FILE, this option has no effect yet as directories are always listed in
  2043. this mode.
  2044. Note: When combined with \fI\-X, \-\-request\fP, this option can be used to send a UIDL
  2045. command instead, so the user may use the email\(aqs unique identifier rather than
  2046. its message\-id to make the request.
  2047. Providing --list-only multiple times has no extra effect.
  2048. Disable it again with \-\-no-list-only.
  2049. Example:
  2050. .nf
  2051. curl --list-only ftp://example.com/dir/
  2052. .fi
  2053. See also \fI-Q, \-\-quote\fP and \fI-X, \-\-request\fP.
  2054. .IP "\-\-local\-port <range>"
  2055. Set a preferred single number or range (FROM\-TO) of local port numbers to use
  2056. for the connection(s). Note that port numbers by nature are a scarce resource
  2057. so setting this range to something too narrow might cause unnecessary
  2058. connection setup failures.
  2059. If --local-port is provided several times, the last set value is used.
  2060. Example:
  2061. .nf
  2062. curl --local-port 1000-3000 https://example.com
  2063. .fi
  2064. See also \fI-g, \-\-globoff\fP.
  2065. .IP "\-L, \-\-location"
  2066. (HTTP) If the server reports that the requested page has moved to a different
  2067. location (indicated with a Location: header and a 3XX response code), this
  2068. option makes curl redo the request on the new place. If used together with
  2069. \fI\-i, \-\-include\fP or \fI\-I, \-\-head\fP, headers from all requested pages are shown.
  2070. When authentication is used, curl only sends its credentials to the initial
  2071. host. If a redirect takes curl to a different host, it does not get the
  2072. user+password pass on. See also \fI\-\-location\-trusted\fP on how to change this.
  2073. Limit the amount of redirects to follow by using the \fI\-\-max\-redirs\fP option.
  2074. When curl follows a redirect and if the request is a POST, it sends the
  2075. following request with a GET if the HTTP response was 301, 302, or 303. If the
  2076. response code was any other 3xx code, curl resends the following request using
  2077. the same unmodified method.
  2078. You can tell curl to not change POST requests to GET after a 30x response by
  2079. using the dedicated options for that: \fI\-\-post301\fP, \fI\-\-post302\fP and \fI\-\-post303\fP.
  2080. The method set with \fI\-X, \-\-request\fP overrides the method curl would otherwise select
  2081. to use.
  2082. Providing --location multiple times has no extra effect.
  2083. Disable it again with \-\-no-location.
  2084. Example:
  2085. .nf
  2086. curl -L https://example.com
  2087. .fi
  2088. See also \fI\-\-resolve\fP and \fI\-\-alt\-svc\fP.
  2089. .IP "\-\-location\-trusted"
  2090. (HTTP) Like \fI\-L, \-\-location\fP, but allows sending the name + password to all hosts that the
  2091. site may redirect to. This may or may not introduce a security breach if the
  2092. site redirects you to a site to which you send your authentication info (which
  2093. is clear\-text in the case of HTTP Basic authentication).
  2094. Providing --location-trusted multiple times has no extra effect.
  2095. Disable it again with \-\-no-location-trusted.
  2096. Example:
  2097. .nf
  2098. curl --location-trusted -u user:password https://example.com
  2099. .fi
  2100. See also \fI-u, \-\-user\fP.
  2101. .IP "\-\-login\-options <options>"
  2102. (IMAP LDAP POP3 SMTP) Specify the login options to use during server authentication.
  2103. You can use login options to specify protocol specific options that may be
  2104. used during authentication. At present only IMAP, POP3 and SMTP support login
  2105. options. For more information about login options please see RFC 2384,
  2106. RFC 5092 and the IETF draft
  2107. https://datatracker.ietf.org/doc/html/draft\-earhart\-url\-smtp\-00
  2108. Since 8.2.0, IMAP supports the login option "AUTH=+LOGIN". With this option,
  2109. curl uses the plain (not SASL) "LOGIN IMAP" command even if the server
  2110. advertises SASL authentication. Care should be taken in using this option, as
  2111. it sends your password over the network in plain text. This does not work if
  2112. the IMAP server disables the plain "LOGIN" (e.g. to prevent password
  2113. snooping).
  2114. If --login-options is provided several times, the last set value is used.
  2115. Example:
  2116. .nf
  2117. curl --login-options 'AUTH=*' imap://example.com
  2118. .fi
  2119. See also \fI-u, \-\-user\fP.
  2120. .IP "\-\-mail\-auth <address>"
  2121. (SMTP) Specify a single address. This is used to specify the authentication address
  2122. (identity) of a submitted message that is being relayed to another server.
  2123. If --mail-auth is provided several times, the last set value is used.
  2124. Example:
  2125. .nf
  2126. curl --mail-auth user@example.com -T mail smtp://example.com/
  2127. .fi
  2128. See also \fI\-\-mail\-rcpt\fP and \fI\-\-mail\-from\fP.
  2129. .IP "\-\-mail\-from <address>"
  2130. (SMTP) Specify a single address that the given mail should get sent from.
  2131. If --mail-from is provided several times, the last set value is used.
  2132. Example:
  2133. .nf
  2134. curl --mail-from user@example.com -T mail smtp://example.com/
  2135. .fi
  2136. See also \fI\-\-mail\-rcpt\fP and \fI\-\-mail\-auth\fP.
  2137. .IP "\-\-mail\-rcpt <address>"
  2138. (SMTP) Specify a single email address, username or mailing list name. Repeat this
  2139. option several times to send to multiple recipients.
  2140. When performing an address verification (\fBVRFY\fP command), the recipient
  2141. should be specified as the username or username and domain (as per Section 3.5
  2142. of RFC 5321).
  2143. When performing a mailing list expand (EXPN command), the recipient should be
  2144. specified using the mailing list name, such as "Friends" or "London\-Office".
  2145. --mail-rcpt can be used several times in a command line
  2146. Example:
  2147. .nf
  2148. curl --mail-rcpt user@example.net smtp://example.com
  2149. .fi
  2150. See also \fI\-\-mail\-rcpt\-allowfails\fP.
  2151. .IP "\-\-mail\-rcpt\-allowfails"
  2152. (SMTP) When sending data to multiple recipients, by default curl aborts SMTP
  2153. conversation if at least one of the recipients causes RCPT TO command to
  2154. return an error.
  2155. The default behavior can be changed by passing \fI\-\-mail\-rcpt\-allowfails\fP
  2156. command\-line option which makes curl ignore errors and proceed with the
  2157. remaining valid recipients.
  2158. If all recipients trigger RCPT TO failures and this flag is specified, curl
  2159. still aborts the SMTP conversation and returns the error received from to the
  2160. last RCPT TO command.
  2161. Providing --mail-rcpt-allowfails multiple times has no extra effect.
  2162. Disable it again with \-\-no-mail-rcpt-allowfails.
  2163. Example:
  2164. .nf
  2165. curl --mail-rcpt-allowfails --mail-rcpt dest@example.com smtp://example.com
  2166. .fi
  2167. Added in 7.69.0. See also \fI\-\-mail\-rcpt\fP.
  2168. .IP "\-M, \-\-manual"
  2169. Manual. Display the huge help text.
  2170. Example:
  2171. .nf
  2172. curl --manual
  2173. .fi
  2174. See also \fI-v, \-\-verbose\fP, \fI\-\-libcurl\fP and \fI\-\-trace\fP.
  2175. .IP "\-\-max\-filesize <bytes>"
  2176. (FTP HTTP MQTT) Specify the maximum size (in bytes) of a file to download. If the file
  2177. requested is larger than this value, the transfer does not start and curl
  2178. returns with exit code 63.
  2179. A size modifier may be used. For example, Appending \(aqk\(aq or \(aqK\(aq counts the
  2180. number as kilobytes, \(aqm\(aq or \(aqM\(aq makes it megabytes, while \(aqg\(aq or \(aqG\(aq makes it
  2181. gigabytes. Examples: 200K, 3m and 1G.
  2182. \fBNOTE\fP: before curl 8.4.0, when the file size is not known prior to
  2183. download, for such files this option has no effect even if the file transfer
  2184. ends up being larger than this given limit.
  2185. Starting with curl 8.4.0, this option aborts the transfer if it reaches the
  2186. threshold during transfer.
  2187. If --max-filesize is provided several times, the last set value is used.
  2188. Example:
  2189. .nf
  2190. curl --max-filesize 100K https://example.com
  2191. .fi
  2192. See also \fI\-\-limit\-rate\fP.
  2193. .IP "\-\-max\-redirs <num>"
  2194. (HTTP) Set maximum number of redirections to follow. When \fI\-L, \-\-location\fP is used, to
  2195. prevent curl from following too many redirects, by default, the limit is
  2196. set to 50 redirects. Set this option to \-1 to make it unlimited.
  2197. If --max-redirs is provided several times, the last set value is used.
  2198. Example:
  2199. .nf
  2200. curl --max-redirs 3 --location https://example.com
  2201. .fi
  2202. See also \fI-L, \-\-location\fP.
  2203. .IP "\-m, \-\-max\-time <seconds>"
  2204. Set maximum time in seconds that you allow each transfer to take. Prevents
  2205. your batch jobs from hanging for hours due to slow networks or links going
  2206. down. This option accepts decimal values.
  2207. If you enable retrying the transfer (\fI\-\-retry\fP) then the maximum time counter is
  2208. reset each time the transfer is retried. You can use \fI\-\-retry\-max\-time\fP to limit
  2209. the retry time.
  2210. The decimal value needs to provided using a dot (.) as decimal separator \- not
  2211. the local version even if it might be using another separator.
  2212. If --max-time is provided several times, the last set value is used.
  2213. Examples:
  2214. .nf
  2215. curl --max-time 10 https://example.com
  2216. curl --max-time 2.92 https://example.com
  2217. .fi
  2218. See also \fI\-\-connect\-timeout\fP and \fI\-\-retry\-max\-time\fP.
  2219. .IP "\-\-metalink"
  2220. This option was previously used to specify a Metalink resource. Metalink
  2221. support is disabled in curl for security reasons (added in 7.78.0).
  2222. If --metalink is provided several times, the last set value is used.
  2223. Example:
  2224. .nf
  2225. curl --metalink file https://example.com
  2226. .fi
  2227. See also \fI-Z, \-\-parallel\fP.
  2228. .IP "\-\-mptcp"
  2229. Enables the use of Multipath TCP (MPTCP) for connections. MPTCP is an extension
  2230. to the standard TCP that allows multiple TCP streams over different network
  2231. paths between the same source and destination. This can enhance bandwidth and
  2232. improve reliability by using multiple paths simultaneously.
  2233. MPTCP is beneficial in networks where multiple paths exist between clients and
  2234. servers, such as mobile networks where a device may switch between WiFi and
  2235. cellular data or in wired networks with multiple Internet Service Providers.
  2236. This option is currently only supported on Linux starting from kernel 5.6. Only
  2237. TCP connections are modified, hence this option does not effect HTTP/3 (QUIC)
  2238. or UDP connections.
  2239. The server curl connects to must also support MPTCP. If not, the connection
  2240. seamlessly falls back to TCP.
  2241. Providing --mptcp multiple times has no extra effect.
  2242. Disable it again with \-\-no-mptcp.
  2243. Example:
  2244. .nf
  2245. curl --mptcp https://example.com
  2246. .fi
  2247. Added in 8.9.0. See also \fI\-\-tcp\-fastopen\fP.
  2248. .IP "\-\-negotiate"
  2249. (HTTP) Enable Negotiate (SPNEGO) authentication.
  2250. This option requires a library built with GSS\-API or SSPI support. Use
  2251. \fI\-V, \-\-version\fP to see if your curl supports GSS\-API/SSPI or SPNEGO.
  2252. When using this option, you must also provide a fake \fI\-u, \-\-user\fP option to activate
  2253. the authentication code properly. Sending a \(aq\-u :\(aq is enough as the username
  2254. and password from the \fI\-u, \-\-user\fP option are not actually used.
  2255. Providing --negotiate multiple times has no extra effect.
  2256. Example:
  2257. .nf
  2258. curl --negotiate -u : https://example.com
  2259. .fi
  2260. See also \fI\-\-basic\fP, \fI\-\-ntlm\fP, \fI\-\-anyauth\fP and \fI\-\-proxy\-negotiate\fP.
  2261. .IP "\-n, \-\-netrc"
  2262. Make curl scan the \fI.netrc\fP file in the user\(aqs home directory for login name
  2263. and password. This is typically used for FTP on Unix. If used with HTTP, curl
  2264. enables user authentication. See \fInetrc(5)\fP and \fIftp(1)\fP for details on the
  2265. file format. Curl does not complain if that file does not have the right
  2266. permissions (it should be neither world\- nor group\-readable). The environment
  2267. variable "HOME" is used to find the home directory.
  2268. On Windows two filenames in the home directory are checked: \fI.netrc\fP and
  2269. \fI_netrc\fP, preferring the former. Older versions on Windows checked for \fI_netrc\fP
  2270. only.
  2271. A quick and simple example of how to setup a \fI.netrc\fP to allow curl to FTP to
  2272. the machine host.domain.com with username \(aqmyself\(aq and password \(aqsecret\(aq could
  2273. look similar to:
  2274. .nf
  2275. machine host.domain.com
  2276. login myself
  2277. password secret
  2278. .fi
  2279. Providing --netrc multiple times has no extra effect.
  2280. Disable it again with \-\-no-netrc.
  2281. Example:
  2282. .nf
  2283. curl --netrc https://example.com
  2284. .fi
  2285. This option is mutually exclusive with \fI\-\-netrc\-file\fP and \fI\-\-netrc\-optional\fP.
  2286. See also \fI\-\-netrc\-file\fP, \fI-K, \-\-config\fP and \fI-u, \-\-user\fP.
  2287. .IP "\-\-netrc\-file <filename>"
  2288. Set the netrc file to use. Similar to \fI\-n, \-\-netrc\fP, except that you also provide
  2289. the path (absolute or relative).
  2290. It abides by \fI\-\-netrc\-optional\fP if specified.
  2291. If --netrc-file is provided several times, the last set value is used.
  2292. Example:
  2293. .nf
  2294. curl --netrc-file netrc https://example.com
  2295. .fi
  2296. This option is mutually exclusive with \fI-n, \-\-netrc\fP.
  2297. See also \fI-n, \-\-netrc\fP, \fI-u, \-\-user\fP and \fI-K, \-\-config\fP.
  2298. .IP "\-\-netrc\-optional"
  2299. Similar to \fI\-n, \-\-netrc\fP, but this option makes the .netrc usage \fBoptional\fP
  2300. and not mandatory as the \fI\-n, \-\-netrc\fP option does.
  2301. Providing --netrc-optional multiple times has no extra effect.
  2302. Disable it again with \-\-no-netrc-optional.
  2303. Example:
  2304. .nf
  2305. curl --netrc-optional https://example.com
  2306. .fi
  2307. This option is mutually exclusive with \fI-n, \-\-netrc\fP.
  2308. See also \fI\-\-netrc\-file\fP.
  2309. .IP "\-:, \-\-next"
  2310. Use a separate operation for the following URL and associated options. This
  2311. allows you to send several URL requests, each with their own specific options,
  2312. for example, such as different usernames or custom requests for each.
  2313. \fI\-:, \-\-next\fP resets all local options and only global ones have their values survive
  2314. over to the operation following the \fI\-:, \-\-next\fP instruction. Global options include
  2315. \fI\-v, \-\-verbose\fP, \fI\-\-trace\fP, \fI\-\-trace\-ascii\fP and \fI\-\-fail\-early\fP.
  2316. For example, you can do both a GET and a POST in a single command line:
  2317. .nf
  2318. curl www1.example.com \--next \-d postthis www2.example.com
  2319. .fi
  2320. --next can be used several times in a command line
  2321. Examples:
  2322. .nf
  2323. curl https://example.com --next -d postthis www2.example.com
  2324. curl -I https://example.com --next https://example.net/
  2325. .fi
  2326. See also \fI-Z, \-\-parallel\fP and \fI-K, \-\-config\fP.
  2327. .IP "\-\-no\-alpn"
  2328. (HTTPS) Disable the ALPN TLS extension. ALPN is enabled by default if libcurl was built
  2329. with an SSL library that supports ALPN. ALPN is used by a libcurl that supports
  2330. HTTP/2 to negotiate HTTP/2 support with the server during https sessions.
  2331. Note that this is the negated option name documented. You can use \fI\-\-alpn\fP to
  2332. enable ALPN.
  2333. Providing --no-alpn multiple times has no extra effect.
  2334. Disable it again with \-\-alpn.
  2335. Example:
  2336. .nf
  2337. curl --no-alpn https://example.com
  2338. .fi
  2339. \fI\-\-no\-alpn\fP requires that libcurl is built to support TLS.
  2340. See also \fI\-\-no\-npn\fP and \fI\-\-http2\fP.
  2341. .IP "\-N, \-\-no\-buffer"
  2342. Disables the buffering of the output stream. In normal work situations, curl
  2343. uses a standard buffered output stream that has the effect that it outputs the
  2344. data in chunks, not necessarily exactly when the data arrives. Using this
  2345. option disables that buffering.
  2346. Note that this is the negated option name documented. You can use \fI\-\-buffer\fP to
  2347. enable buffering again.
  2348. Providing --no-buffer multiple times has no extra effect.
  2349. Disable it again with \-\-buffer.
  2350. Example:
  2351. .nf
  2352. curl --no-buffer https://example.com
  2353. .fi
  2354. See also \fI-#, \-\-progress\-bar\fP.
  2355. .IP "\-\-no\-clobber"
  2356. When used in conjunction with the \fI\-o, \-\-output\fP, \fI\-J, \-\-remote\-header\-name\fP,
  2357. \fI\-O, \-\-remote\-name\fP, or \fI\-\-remote\-name\-all\fP options, curl avoids overwriting files
  2358. that already exist. Instead, a dot and a number gets appended to the name of
  2359. the file that would be created, up to filename.100 after which it does not
  2360. create any file.
  2361. Note that this is the negated option name documented. You can thus use
  2362. \fI\-\-clobber\fP to enforce the clobbering, even if \fI\-J, \-\-remote\-header\-name\fP is
  2363. specified.
  2364. Providing --no-clobber multiple times has no extra effect.
  2365. Disable it again with \-\-clobber.
  2366. Example:
  2367. .nf
  2368. curl --no-clobber --output local/dir/file https://example.com
  2369. .fi
  2370. Added in 7.83.0. See also \fI-o, \-\-output\fP and \fI-O, \-\-remote\-name\fP.
  2371. .IP "\-\-no\-keepalive"
  2372. Disables the use of keepalive messages on the TCP connection. curl otherwise
  2373. enables them by default.
  2374. Note that this is the negated option name documented. You can thus use
  2375. \fI\-\-keepalive\fP to enforce keepalive.
  2376. Providing --no-keepalive multiple times has no extra effect.
  2377. Disable it again with \-\-keepalive.
  2378. Example:
  2379. .nf
  2380. curl --no-keepalive https://example.com
  2381. .fi
  2382. See also \fI\-\-keepalive\-time\fP and \fI\-\-keepalive\-cnt\fP.
  2383. .IP "\-\-no\-npn"
  2384. (HTTPS) curl never uses NPN, this option has no effect (added in 7.86.0).
  2385. Disable the NPN TLS extension. NPN is enabled by default if libcurl was built
  2386. with an SSL library that supports NPN. NPN is used by a libcurl that supports
  2387. HTTP/2 to negotiate HTTP/2 support with the server during https sessions.
  2388. Providing --no-npn multiple times has no extra effect.
  2389. Disable it again with \-\-npn.
  2390. Example:
  2391. .nf
  2392. curl --no-npn https://example.com
  2393. .fi
  2394. \fI\-\-no\-npn\fP requires that libcurl is built to support TLS.
  2395. See also \fI\-\-no\-alpn\fP and \fI\-\-http2\fP.
  2396. .IP "\-\-no\-progress\-meter"
  2397. Option to switch off the progress meter output without muting or otherwise
  2398. affecting warning and informational messages like \fI\-s, \-\-silent\fP does.
  2399. Note that this is the negated option name documented. You can thus use
  2400. \fI\-\-progress\-meter\fP to enable the progress meter again.
  2401. Providing --no-progress-meter multiple times has no extra effect.
  2402. Disable it again with \-\-progress-meter.
  2403. Example:
  2404. .nf
  2405. curl --no-progress-meter -o store https://example.com
  2406. .fi
  2407. Added in 7.67.0. See also \fI-v, \-\-verbose\fP and \fI-s, \-\-silent\fP.
  2408. .IP "\-\-no\-sessionid"
  2409. (TLS) Disable curl\(aqs use of SSL session\-ID caching. By default all transfers are
  2410. done using the cache. Note that while nothing should ever get hurt by
  2411. attempting to reuse SSL session\-IDs, there seem to be broken SSL
  2412. implementations in the wild that may require you to disable this in order for
  2413. you to succeed.
  2414. Note that this is the negated option name documented. You can thus use
  2415. \fI\-\-sessionid\fP to enforce session\-ID caching.
  2416. Providing --no-sessionid multiple times has no extra effect.
  2417. Disable it again with \-\-sessionid.
  2418. Example:
  2419. .nf
  2420. curl --no-sessionid https://example.com
  2421. .fi
  2422. See also \fI-k, \-\-insecure\fP.
  2423. .IP "\-\-noproxy <no\-proxy\-list>"
  2424. Comma\-separated list of hosts for which not to use a proxy, if one is
  2425. specified. The only wildcard is a single "*" character, which matches all
  2426. hosts, and effectively disables the proxy. Each name in this list is matched
  2427. as either a domain which contains the hostname, or the hostname itself. For
  2428. example, "local.com" would match "local.com", "local.com:80", and
  2429. \&"www.local.com", but not "www.notlocal.com".
  2430. This option overrides the environment variables that disable the proxy
  2431. ("no_proxy" and "NO_PROXY"). If there is an environment
  2432. variable disabling a proxy, you can set the no proxy list to "" to override
  2433. it.
  2434. IP addresses specified to this option can be provided using CIDR notation
  2435. (added in 7.86.0): an appended slash and number specifies the number of
  2436. network bits out of the address to use in the comparison. For example
  2437. \&"192.168.0.0/16" would match all addresses starting with "192.168".
  2438. If --noproxy is provided several times, the last set value is used.
  2439. Example:
  2440. .nf
  2441. curl --noproxy "www.example" https://example.com
  2442. .fi
  2443. See also \fI-x, \-\-proxy\fP.
  2444. .IP "\-\-ntlm"
  2445. (HTTP) Use NTLM authentication. The NTLM authentication method was designed by
  2446. Microsoft and is used by IIS web servers. It is a proprietary protocol,
  2447. reverse\-engineered by clever people and implemented in curl based on their
  2448. efforts. This kind of behavior should not be endorsed, you should encourage
  2449. everyone who uses NTLM to switch to a public and documented authentication
  2450. method instead, such as Digest.
  2451. If you want to enable NTLM for your proxy authentication, then use
  2452. \fI\-\-proxy\-ntlm\fP.
  2453. Providing --ntlm multiple times has no extra effect.
  2454. Example:
  2455. .nf
  2456. curl --ntlm -u user:password https://example.com
  2457. .fi
  2458. \fI\-\-ntlm\fP requires that libcurl is built to support TLS.
  2459. This option is mutually exclusive with \fI\-\-basic\fP, \fI\-\-negotiate\fP, \fI\-\-digest\fP and \fI\-\-anyauth\fP.
  2460. See also \fI\-\-proxy\-ntlm\fP.
  2461. .IP "\-\-ntlm\-wb"
  2462. (HTTP) Deprecated option (added in 8.8.0).
  2463. Enabled NTLM much in the style \fI\-\-ntlm\fP does, but handed over the authentication
  2464. to a separate executable that was executed when needed.
  2465. Providing --ntlm-wb multiple times has no extra effect.
  2466. Example:
  2467. .nf
  2468. curl --ntlm-wb -u user:password https://example.com
  2469. .fi
  2470. See also \fI\-\-ntlm\fP and \fI\-\-proxy\-ntlm\fP.
  2471. .IP "\-\-oauth2\-bearer <token>"
  2472. (IMAP LDAP POP3 SMTP HTTP) Specify the Bearer Token for OAUTH 2.0 server authentication. The Bearer Token
  2473. is used in conjunction with the username which can be specified as part of the
  2474. \fI\-\-url\fP or \fI\-u, \-\-user\fP options.
  2475. The Bearer Token and username are formatted according to RFC 6750.
  2476. If --oauth2-bearer is provided several times, the last set value is used.
  2477. Example:
  2478. .nf
  2479. curl --oauth2-bearer "mF_9.B5f-4.1JqM" https://example.com
  2480. .fi
  2481. See also \fI\-\-basic\fP, \fI\-\-ntlm\fP and \fI\-\-digest\fP.
  2482. .IP "\-o, \-\-output <file>"
  2483. Write output to the given file instead of stdout. If you are using globbing to
  2484. fetch multiple documents, you should quote the URL and you can use "#"
  2485. followed by a number in the filename. That variable is then replaced with the
  2486. current string for the URL being fetched. Like in:
  2487. .nf
  2488. curl "http://{one,two}.example.com" \-o "file_#1.txt"
  2489. .fi
  2490. or use several variables like:
  2491. .nf
  2492. curl "http://{site,host}.host[1\-5].example" \-o "#1_#2"
  2493. .fi
  2494. You may use this option as many times as the number of URLs you have. For
  2495. example, if you specify two URLs on the same command line, you can use it like
  2496. this:
  2497. .nf
  2498. curl \-o aa example.com \-o bb example.net
  2499. .fi
  2500. and the order of the \-o options and the URLs does not matter, just that the
  2501. first \-o is for the first URL and so on, so the above command line can also be
  2502. written as
  2503. .nf
  2504. curl example.com example.net \-o aa \-o bb
  2505. .fi
  2506. See also the \fI\-\-create\-dirs\fP option to create the local directories
  2507. dynamically. Specifying the output as \(aq\-\(aq (a single dash) passes the output to
  2508. stdout.
  2509. To suppress response bodies, you can redirect output to /dev/null:
  2510. .nf
  2511. curl example.com \-o /dev/null
  2512. .fi
  2513. Or for Windows:
  2514. .nf
  2515. curl example.com \-o nul
  2516. .fi
  2517. Specify the filename as single minus to force the output to stdout, to
  2518. override curl\(aqs internal binary output in terminal prevention:
  2519. .nf
  2520. curl https://example.com/jpeg \-o \-
  2521. .fi
  2522. --output is associated with a single URL. Use it once per URL when you use several URLs in a command line.
  2523. Examples:
  2524. .nf
  2525. curl -o file https://example.com
  2526. curl "http://{one,two}.example.com" -o "file_#1.txt"
  2527. curl "http://{site,host}.host[1-5].example" -o "#1_#2"
  2528. curl -o file https://example.com -o file2 https://example.net
  2529. .fi
  2530. See also \fI-O, \-\-remote\-name\fP, \fI\-\-remote\-name\-all\fP and \fI-J, \-\-remote\-header\-name\fP.
  2531. .IP "\-\-output\-dir <dir>"
  2532. Specify the directory in which files should be stored, when \fI\-O, \-\-remote\-name\fP or
  2533. \fI\-o, \-\-output\fP are used.
  2534. The given output directory is used for all URLs and output options on the
  2535. command line, up until the first \fI\-:, \-\-next\fP.
  2536. If the specified target directory does not exist, the operation fails unless
  2537. \fI\-\-create\-dirs\fP is also used.
  2538. If --output-dir is provided several times, the last set value is used.
  2539. Example:
  2540. .nf
  2541. curl --output-dir "tmp" -O https://example.com
  2542. .fi
  2543. Added in 7.73.0. See also \fI-O, \-\-remote\-name\fP and \fI-J, \-\-remote\-header\-name\fP.
  2544. .IP "\-Z, \-\-parallel"
  2545. Makes curl perform all transfers in parallel as compared to the regular serial
  2546. manner. Parallel transfer means that curl runs up to N concurrent transfers
  2547. simultaneously and if there are more than N transfers to handle, it starts new
  2548. ones when earlier transfers finish.
  2549. With parallel transfers, the progress meter output is different than when
  2550. doing serial transfers, as it then displays the transfer status for multiple
  2551. transfers in a single line.
  2552. The maximum amount of concurrent transfers is set with \fI\-\-parallel\-max\fP and it
  2553. defaults to 50.
  2554. This option is global and does not need to be specified for each use of --next.
  2555. Providing --parallel multiple times has no extra effect.
  2556. Disable it again with \-\-no-parallel.
  2557. Example:
  2558. .nf
  2559. curl --parallel https://example.com -o file1 https://example.com -o file2
  2560. .fi
  2561. Added in 7.66.0. See also \fI-:, \-\-next\fP, \fI-v, \-\-verbose\fP, \fI\-\-parallel\-max\fP and \fI\-\-parallel\-immediate\fP.
  2562. .IP "\-\-parallel\-immediate"
  2563. When doing parallel transfers, this option instructs curl to prefer opening up
  2564. more connections in parallel at once rather than waiting to see if new
  2565. transfers can be added as multiplexed streams on another connection.
  2566. By default, without this option set, curl prefers to wait a little and
  2567. multiplex new transfers over existing connections. It keeps the number of
  2568. connections low at the expense of risking a slightly slower transfer startup.
  2569. This option is global and does not need to be specified for each use of --next.
  2570. Providing --parallel-immediate multiple times has no extra effect.
  2571. Disable it again with \-\-no-parallel-immediate.
  2572. Example:
  2573. .nf
  2574. curl --parallel-immediate -Z https://example.com -o file1 https://example.com -o file2
  2575. .fi
  2576. Added in 7.68.0. See also \fI-Z, \-\-parallel\fP and \fI\-\-parallel\-max\fP.
  2577. .IP "\-\-parallel\-max <num>"
  2578. When asked to do parallel transfers, using \fI\-Z, \-\-parallel\fP, this option controls
  2579. the maximum amount of transfers to do simultaneously.
  2580. The default is 50. 300 is the largest supported value.
  2581. This option is global and does not need to be specified for each use of --next.
  2582. If --parallel-max is provided several times, the last set value is used.
  2583. Example:
  2584. .nf
  2585. curl --parallel-max 100 -Z https://example.com ftp://example.com/
  2586. .fi
  2587. Added in 7.66.0. See also \fI-Z, \-\-parallel\fP.
  2588. .IP "\-\-pass <phrase>"
  2589. (SSH TLS) Passphrase for the private key.
  2590. If --pass is provided several times, the last set value is used.
  2591. Example:
  2592. .nf
  2593. curl --pass secret --key file https://example.com
  2594. .fi
  2595. See also \fI\-\-key\fP and \fI-u, \-\-user\fP.
  2596. .IP "\-\-path\-as\-is"
  2597. Do not handle sequences of /../ or /./ in the given URL path. Normally curl
  2598. squashes or merges them according to standards but with this option set you
  2599. tell it not to do that.
  2600. Providing --path-as-is multiple times has no extra effect.
  2601. Disable it again with \-\-no-path-as-is.
  2602. Example:
  2603. .nf
  2604. curl --path-as-is https://example.com/../../etc/passwd
  2605. .fi
  2606. See also \fI\-\-request\-target\fP.
  2607. .IP "\-\-pinnedpubkey <hashes>"
  2608. (TLS) Use the specified public key file (or hashes) to verify the peer. This can be
  2609. a path to a file which contains a single public key in PEM or DER format, or
  2610. any number of base64 encoded sha256 hashes preceded by \(aqsha256//\(aq and
  2611. separated by \(aq;\(aq.
  2612. When negotiating a TLS or SSL connection, the server sends a certificate
  2613. indicating its identity. A public key is extracted from this certificate and
  2614. if it does not exactly match the public key provided to this option, curl
  2615. aborts the connection before sending or receiving any data.
  2616. This option is independent of option \fI\-k, \-\-insecure\fP. If you use both options
  2617. together then the peer is still verified by public key.
  2618. PEM/DER support:
  2619. OpenSSL and GnuTLS, wolfSSL, mbedTLS
  2620. , Secure Transport macOS 10.7+/iOS 10+,
  2621. Schannel
  2622. sha256 support:
  2623. OpenSSL, GnuTLS and wolfSSL, mbedTLS,
  2624. Secure Transport macOS 10.7+/iOS 10+, Schannel
  2625. Other SSL backends not supported.
  2626. If --pinnedpubkey is provided several times, the last set value is used.
  2627. Examples:
  2628. .nf
  2629. curl --pinnedpubkey keyfile https://example.com
  2630. curl --pinnedpubkey 'sha256//ce118b51897f4452dc' https://example.com
  2631. .fi
  2632. See also \fI\-\-hostpubsha256\fP.
  2633. .IP "\-\-post301"
  2634. (HTTP) Respect RFC 7231/6.4.2 and do not convert POST requests into GET requests when
  2635. following a 301 redirect. The non\-RFC behavior is ubiquitous in web browsers,
  2636. so curl does the conversion by default to maintain consistency. However, a
  2637. server may require a POST to remain a POST after such a redirection. This
  2638. option is meaningful only when using \fI\-L, \-\-location\fP.
  2639. Providing --post301 multiple times has no extra effect.
  2640. Disable it again with \-\-no-post301.
  2641. Example:
  2642. .nf
  2643. curl --post301 --location -d "data" https://example.com
  2644. .fi
  2645. See also \fI\-\-post302\fP, \fI\-\-post303\fP and \fI-L, \-\-location\fP.
  2646. .IP "\-\-post302"
  2647. (HTTP) Respect RFC 7231/6.4.3 and do not convert POST requests into GET requests when
  2648. following a 302 redirect. The non\-RFC behavior is ubiquitous in web browsers,
  2649. so curl does the conversion by default to maintain consistency. However, a
  2650. server may require a POST to remain a POST after such a redirection. This
  2651. option is meaningful only when using \fI\-L, \-\-location\fP.
  2652. Providing --post302 multiple times has no extra effect.
  2653. Disable it again with \-\-no-post302.
  2654. Example:
  2655. .nf
  2656. curl --post302 --location -d "data" https://example.com
  2657. .fi
  2658. See also \fI\-\-post301\fP, \fI\-\-post303\fP and \fI-L, \-\-location\fP.
  2659. .IP "\-\-post303"
  2660. (HTTP) Violate RFC 7231/6.4.4 and do not convert POST requests into GET requests when
  2661. following 303 redirect. A server may require a POST to remain a POST after a
  2662. 303 redirection. This option is meaningful only when using \fI\-L, \-\-location\fP.
  2663. Providing --post303 multiple times has no extra effect.
  2664. Disable it again with \-\-no-post303.
  2665. Example:
  2666. .nf
  2667. curl --post303 --location -d "data" https://example.com
  2668. .fi
  2669. See also \fI\-\-post302\fP, \fI\-\-post301\fP and \fI-L, \-\-location\fP.
  2670. .IP "\-\-preproxy [protocol://]host[:port]"
  2671. Use the specified SOCKS proxy before connecting to an HTTP or HTTPS \fI\-x, \-\-proxy\fP. In
  2672. such a case curl first connects to the SOCKS proxy and then connects (through
  2673. SOCKS) to the HTTP or HTTPS proxy. Hence pre proxy.
  2674. The pre proxy string should be specified with a protocol:// prefix to specify
  2675. alternative proxy protocols. Use socks4://, socks4a://, socks5:// or
  2676. socks5h:// to request the specific SOCKS version to be used. No protocol
  2677. specified makes curl default to SOCKS4.
  2678. If the port number is not specified in the proxy string, it is assumed to be
  2679. 1080.
  2680. User and password that might be provided in the proxy string are URL decoded
  2681. by curl. This allows you to pass in special characters such as @ by using %40
  2682. or pass in a colon with %3a.
  2683. If --preproxy is provided several times, the last set value is used.
  2684. Example:
  2685. .nf
  2686. curl --preproxy socks5://proxy.example -x http://http.example https://example.com
  2687. .fi
  2688. See also \fI-x, \-\-proxy\fP and \fI\-\-socks5\fP.
  2689. .IP "\-#, \-\-progress\-bar"
  2690. Make curl display transfer progress as a simple progress bar instead of the
  2691. standard, more informational, meter.
  2692. This progress bar draws a single line of \(aq#\(aq characters across the screen and
  2693. shows a percentage if the transfer size is known. For transfers without a
  2694. known size, there is a space ship (\-=o=\-) that moves back and forth but only
  2695. while data is being transferred, with a set of flying hash sign symbols on
  2696. top.
  2697. This option is global and does not need to be specified for each use of --next.
  2698. Providing --progress-bar multiple times has no extra effect.
  2699. Disable it again with \-\-no-progress-bar.
  2700. Example:
  2701. .nf
  2702. curl -# -O https://example.com
  2703. .fi
  2704. See also \fI\-\-styled\-output\fP.
  2705. .IP "\-\-proto <protocols>"
  2706. Limit what protocols to allow for transfers. Protocols are evaluated left to
  2707. right, are comma separated, and are each a protocol name or \(aqall\(aq, optionally
  2708. prefixed by zero or more modifiers. Available modifiers are:
  2709. .RS
  2710. .IP +
  2711. Permit this protocol in addition to protocols already permitted (this is
  2712. the default if no modifier is used).
  2713. .IP -
  2714. Deny this protocol, removing it from the list of protocols already permitted.
  2715. .IP =
  2716. Permit only this protocol (ignoring the list already permitted), though
  2717. subject to later modification by subsequent entries in the comma separated
  2718. list.
  2719. .RE
  2720. .IP
  2721. For example: \fI\-\-proto\fP \-ftps uses the default protocols, but disables ftps
  2722. \fI\-\-proto\fP \-all,https,+http only enables http and https
  2723. \fI\-\-proto\fP =http,https also only enables http and https
  2724. Unknown and disabled protocols produce a warning. This allows scripts to
  2725. safely rely on being able to disable potentially dangerous protocols, without
  2726. relying upon support for that protocol being built into curl to avoid an error.
  2727. This option can be used multiple times, in which case the effect is the same
  2728. as concatenating the protocols into one instance of the option.
  2729. If --proto is provided several times, the last set value is used.
  2730. Example:
  2731. .nf
  2732. curl --proto =http,https,sftp https://example.com
  2733. .fi
  2734. See also \fI\-\-proto\-redir\fP and \fI\-\-proto\-default\fP.
  2735. .IP "\-\-proto\-default <protocol>"
  2736. Use \fIprotocol\fP for any provided URL missing a scheme.
  2737. An unknown or unsupported protocol causes error \fICURLE_UNSUPPORTED_PROTOCOL\fP.
  2738. This option does not change the default proxy protocol (http).
  2739. Without this option set, curl guesses protocol based on the hostname, see
  2740. \fI\-\-url\fP for details.
  2741. If --proto-default is provided several times, the last set value is used.
  2742. Example:
  2743. .nf
  2744. curl --proto-default https ftp.example.com
  2745. .fi
  2746. See also \fI\-\-proto\fP and \fI\-\-proto\-redir\fP.
  2747. .IP "\-\-proto\-redir <protocols>"
  2748. Limit what protocols to allow on redirects. Protocols denied by \fI\-\-proto\fP are
  2749. not overridden by this option. See \fI\-\-proto\fP for how protocols are represented.
  2750. Example, allow only HTTP and HTTPS on redirect:
  2751. .nf
  2752. curl \--proto\-redir \-all,http,https http://example.com
  2753. .fi
  2754. By default curl only allows HTTP, HTTPS, FTP and FTPS on redirects
  2755. (added in 7.65.2). Specifying \fIall\fP or \fI+all\fP enables all protocols on
  2756. redirects, which is not good for security.
  2757. If --proto-redir is provided several times, the last set value is used.
  2758. Example:
  2759. .nf
  2760. curl --proto-redir =http,https https://example.com
  2761. .fi
  2762. See also \fI\-\-proto\fP.
  2763. .IP "\-x, \-\-proxy [protocol://]host[:port]"
  2764. Use the specified proxy.
  2765. The proxy string can be specified with a protocol:// prefix. No protocol
  2766. specified or http:// it is treated as an HTTP proxy. Use socks4://,
  2767. socks4a://, socks5:// or socks5h:// to request a specific SOCKS version to be
  2768. used.
  2769. Unix domain sockets are supported for socks proxy. Set localhost for the host
  2770. part. e.g. socks5h://localhost/path/to/socket.sock
  2771. HTTPS proxy support works set with the https:// protocol prefix for OpenSSL
  2772. and GnuTLS. It also works for BearSSL, mbedTLS, rustls,
  2773. Schannel, Secure Transport and wolfSSL (added in 7.87.0).
  2774. Unrecognized and unsupported proxy protocols cause an error.
  2775. Ancient curl versions ignored unknown schemes and used http:// instead.
  2776. If the port number is not specified in the proxy string, it is assumed to be
  2777. 1080.
  2778. This option overrides existing environment variables that set the proxy to
  2779. use. If there is an environment variable setting a proxy, you can set proxy to
  2780. \&"" to override it.
  2781. All operations that are performed over an HTTP proxy are transparently
  2782. converted to HTTP. It means that certain protocol specific operations might
  2783. not be available. This is not the case if you can tunnel through the proxy, as
  2784. one with the \fI\-p, \-\-proxytunnel\fP option.
  2785. User and password that might be provided in the proxy string are URL decoded
  2786. by curl. This allows you to pass in special characters such as @ by using %40
  2787. or pass in a colon with %3a.
  2788. The proxy host can be specified the same way as the proxy environment
  2789. variables, including the protocol prefix (http://) and the embedded user +
  2790. password.
  2791. When a proxy is used, the active FTP mode as set with \fI\-P, \-\-ftp\-port\fP, cannot be
  2792. used.
  2793. If --proxy is provided several times, the last set value is used.
  2794. Example:
  2795. .nf
  2796. curl --proxy http://proxy.example https://example.com
  2797. .fi
  2798. See also \fI\-\-socks5\fP and \fI\-\-proxy\-basic\fP.
  2799. .IP "\-\-proxy\-anyauth"
  2800. Automatically pick a suitable authentication method when communicating with
  2801. the given HTTP proxy. This might cause an extra request/response round\-trip.
  2802. Providing --proxy-anyauth multiple times has no extra effect.
  2803. Example:
  2804. .nf
  2805. curl --proxy-anyauth --proxy-user user:passwd -x proxy https://example.com
  2806. .fi
  2807. See also \fI-x, \-\-proxy\fP, \fI\-\-proxy\-basic\fP and \fI\-\-proxy\-digest\fP.
  2808. .IP "\-\-proxy\-basic"
  2809. Use HTTP Basic authentication when communicating with the given proxy. Use
  2810. \fI\-\-basic\fP for enabling HTTP Basic with a remote host. Basic is the default
  2811. authentication method curl uses with proxies.
  2812. Providing --proxy-basic multiple times has no extra effect.
  2813. Example:
  2814. .nf
  2815. curl --proxy-basic --proxy-user user:passwd -x proxy https://example.com
  2816. .fi
  2817. See also \fI-x, \-\-proxy\fP, \fI\-\-proxy\-anyauth\fP and \fI\-\-proxy\-digest\fP.
  2818. .IP "\-\-proxy\-ca\-native"
  2819. (TLS) Use the CA store from the native operating system to verify the HTTPS proxy.
  2820. By default, curl uses a CA store provided in a single file or directory, but
  2821. when using this option it interfaces the operating system\(aqs own vault.
  2822. This option works for curl on Windows when built to use OpenSSL, wolfSSL
  2823. (added in 8.3.0) or GnuTLS (added in 8.5.0). When curl on Windows is built to
  2824. use Schannel, this feature is implied and curl then only uses the native CA
  2825. store.
  2826. Providing --proxy-ca-native multiple times has no extra effect.
  2827. Disable it again with \-\-no-proxy-ca-native.
  2828. Example:
  2829. .nf
  2830. curl --proxy-ca-native https://example.com
  2831. .fi
  2832. Added in 8.2.0. See also \fI\-\-cacert\fP, \fI\-\-capath\fP and \fI-k, \-\-insecure\fP.
  2833. .IP "\-\-proxy\-cacert <file>"
  2834. Use the specified certificate file to verify the HTTPS proxy. The file may
  2835. contain multiple CA certificates. The certificate(s) must be in PEM format.
  2836. This allows you to use a different trust for the proxy compared to the remote
  2837. server connected to via the proxy.
  2838. Equivalent to \fI\-\-cacert\fP but used in HTTPS proxy context.
  2839. If --proxy-cacert is provided several times, the last set value is used.
  2840. Example:
  2841. .nf
  2842. curl --proxy-cacert CA-file.txt -x https://proxy https://example.com
  2843. .fi
  2844. See also \fI\-\-proxy\-capath\fP, \fI\-\-cacert\fP, \fI\-\-capath\fP and \fI-x, \-\-proxy\fP.
  2845. .IP "\-\-proxy\-capath <dir>"
  2846. Same as \fI\-\-capath\fP but used in HTTPS proxy context.
  2847. Use the specified certificate directory to verify the proxy. Multiple paths
  2848. can be provided by separated with colon (":") (e.g. "path1:path2:path3"). The
  2849. certificates must be in PEM format, and if curl is built against OpenSSL, the
  2850. directory must have been processed using the c_rehash utility supplied with
  2851. OpenSSL. Using \fI\-\-proxy\-capath\fP can allow OpenSSL\-powered curl to make
  2852. SSL\-connections much more efficiently than using \fI\-\-proxy\-cacert\fP if the
  2853. \fI\-\-proxy\-cacert\fP file contains many CA certificates.
  2854. If this option is set, the default capath value is ignored.
  2855. If --proxy-capath is provided several times, the last set value is used.
  2856. Example:
  2857. .nf
  2858. curl --proxy-capath /local/directory -x https://proxy https://example.com
  2859. .fi
  2860. See also \fI\-\-proxy\-cacert\fP, \fI-x, \-\-proxy\fP and \fI\-\-capath\fP.
  2861. .IP "\-\-proxy\-cert <cert[:passwd]>"
  2862. Use the specified client certificate file when communicating with an HTTPS
  2863. proxy. The certificate must be in PKCS#12 format if using Secure Transport, or
  2864. PEM format if using any other engine. If the optional password is not
  2865. specified, it is queried for on the terminal. Use \fI\-\-proxy\-key\fP to provide the
  2866. private key.
  2867. This option is the equivalent to \fI\-E, \-\-cert\fP but used in HTTPS proxy context.
  2868. If --proxy-cert is provided several times, the last set value is used.
  2869. Example:
  2870. .nf
  2871. curl --proxy-cert file -x https://proxy https://example.com
  2872. .fi
  2873. See also \fI-x, \-\-proxy\fP, \fI\-\-proxy\-key\fP and \fI\-\-proxy\-cert\-type\fP.
  2874. .IP "\-\-proxy\-cert\-type <type>"
  2875. Set type of the provided client certificate when using HTTPS proxy. PEM, DER,
  2876. ENG and P12 are recognized types.
  2877. The default type depends on the TLS backend and is usually PEM, however for
  2878. Secure Transport and Schannel it is P12. If \fI\-\-proxy\-cert\fP is a pkcs11: URI then
  2879. ENG is the default type.
  2880. Equivalent to \fI\-\-cert\-type\fP but used in HTTPS proxy context.
  2881. If --proxy-cert-type is provided several times, the last set value is used.
  2882. Example:
  2883. .nf
  2884. curl --proxy-cert-type PEM --proxy-cert file -x https://proxy https://example.com
  2885. .fi
  2886. See also \fI\-\-proxy\-cert\fP and \fI\-\-proxy\-key\fP.
  2887. .IP "\-\-proxy\-ciphers <list>"
  2888. Same as \fI\-\-ciphers\fP but used in HTTPS proxy context.
  2889. Specifies which ciphers to use in the connection to the HTTPS proxy. The list
  2890. of ciphers must specify valid ciphers. Read up on SSL cipher list details on
  2891. this URL:
  2892. https://curl.se/docs/ssl\-ciphers.html
  2893. If --proxy-ciphers is provided several times, the last set value is used.
  2894. Example:
  2895. .nf
  2896. curl --proxy-ciphers ECDHE-ECDSA-AES256-CCM8 -x https://proxy https://example.com
  2897. .fi
  2898. See also \fI\-\-ciphers\fP, \fI\-\-curves\fP and \fI-x, \-\-proxy\fP.
  2899. .IP "\-\-proxy\-crlfile <file>"
  2900. Provide filename for a PEM formatted file with a Certificate Revocation List
  2901. that specifies peer certificates that are considered revoked when
  2902. communicating with an HTTPS proxy.
  2903. Equivalent to \fI\-\-crlfile\fP but only used in HTTPS proxy context.
  2904. If --proxy-crlfile is provided several times, the last set value is used.
  2905. Example:
  2906. .nf
  2907. curl --proxy-crlfile rejects.txt -x https://proxy https://example.com
  2908. .fi
  2909. See also \fI\-\-crlfile\fP and \fI-x, \-\-proxy\fP.
  2910. .IP "\-\-proxy\-digest"
  2911. Use HTTP Digest authentication when communicating with the given proxy. Use
  2912. \fI\-\-digest\fP for enabling HTTP Digest with a remote host.
  2913. Providing --proxy-digest multiple times has no extra effect.
  2914. Example:
  2915. .nf
  2916. curl --proxy-digest --proxy-user user:passwd -x proxy https://example.com
  2917. .fi
  2918. See also \fI-x, \-\-proxy\fP, \fI\-\-proxy\-anyauth\fP and \fI\-\-proxy\-basic\fP.
  2919. .IP "\-\-proxy\-header <header/@file>"
  2920. (HTTP) Extra header to include in the request when sending HTTP to a proxy. You may
  2921. specify any number of extra headers. This is the equivalent option to \fI\-H, \-\-header\fP
  2922. but is for proxy communication only like in CONNECT requests when you want a
  2923. separate header sent to the proxy to what is sent to the actual remote host.
  2924. curl makes sure that each header you add/replace is sent with the proper
  2925. end\-of\-line marker, you should thus \fBnot\fP add that as a part of the header
  2926. content: do not add newlines or carriage returns, they only mess things up for
  2927. you.
  2928. Headers specified with this option are not included in requests that curl
  2929. knows are not be sent to a proxy.
  2930. This option can take an argument in @filename style, which then adds a header
  2931. for each line in the input file. Using @\- makes curl read
  2932. the headers from stdin.
  2933. This option can be used multiple times to add/replace/remove multiple headers.
  2934. --proxy-header can be used several times in a command line
  2935. Examples:
  2936. .nf
  2937. curl --proxy-header "X-First-Name: Joe" -x http://proxy https://example.com
  2938. curl --proxy-header "User-Agent: surprise" -x http://proxy https://example.com
  2939. curl --proxy-header "Host:" -x http://proxy https://example.com
  2940. .fi
  2941. See also \fI-x, \-\-proxy\fP.
  2942. .IP "\-\-proxy\-http2"
  2943. (HTTP) Negotiate HTTP/2 with an HTTPS proxy. The proxy might still only offer HTTP/1
  2944. and then curl sticks to using that version.
  2945. This has no effect for any other kinds of proxies.
  2946. Providing --proxy-http2 multiple times has no extra effect.
  2947. Disable it again with \-\-no-proxy-http2.
  2948. Example:
  2949. .nf
  2950. curl --proxy-http2 -x proxy https://example.com
  2951. .fi
  2952. \fI\-\-proxy\-http2\fP requires that libcurl is built to support HTTP/2.
  2953. Added in 8.1.0. See also \fI-x, \-\-proxy\fP.
  2954. .IP "\-\-proxy\-insecure"
  2955. Same as \fI\-k, \-\-insecure\fP but used in HTTPS proxy context.
  2956. Every secure connection curl makes is verified to be secure before the
  2957. transfer takes place. This option makes curl skip the verification step with a
  2958. proxy and proceed without checking.
  2959. When this option is not used for a proxy using HTTPS, curl verifies the
  2960. proxy\(aqs TLS certificate before it continues: that the certificate contains the
  2961. right name which matches the hostname and that the certificate has been signed
  2962. by a CA certificate present in the cert store. See this online resource for
  2963. further details: \fBhttps://curl.se/docs/sslcerts.html\fP
  2964. \fBWARNING\fP: using this option makes the transfer to the proxy insecure.
  2965. Providing --proxy-insecure multiple times has no extra effect.
  2966. Disable it again with \-\-no-proxy-insecure.
  2967. Example:
  2968. .nf
  2969. curl --proxy-insecure -x https://proxy https://example.com
  2970. .fi
  2971. See also \fI-x, \-\-proxy\fP and \fI-k, \-\-insecure\fP.
  2972. .IP "\-\-proxy\-key <key>"
  2973. Specify the filename for your private key when using client certificates with
  2974. your HTTPS proxy. This option is the equivalent to \fI\-\-key\fP but used in HTTPS
  2975. proxy context.
  2976. If --proxy-key is provided several times, the last set value is used.
  2977. Example:
  2978. .nf
  2979. curl --proxy-key here -x https://proxy https://example.com
  2980. .fi
  2981. See also \fI\-\-proxy\-key\-type\fP and \fI-x, \-\-proxy\fP.
  2982. .IP "\-\-proxy\-key\-type <type>"
  2983. Specify the private key file type your \fI\-\-proxy\-key\fP provided private key uses.
  2984. DER, PEM, and ENG are supported. If not specified, PEM is assumed.
  2985. Equivalent to \fI\-\-key\-type\fP but used in HTTPS proxy context.
  2986. If --proxy-key-type is provided several times, the last set value is used.
  2987. Example:
  2988. .nf
  2989. curl --proxy-key-type DER --proxy-key here -x https://proxy https://example.com
  2990. .fi
  2991. See also \fI\-\-proxy\-key\fP and \fI-x, \-\-proxy\fP.
  2992. .IP "\-\-proxy\-negotiate"
  2993. Use HTTP Negotiate (SPNEGO) authentication when communicating with the given
  2994. proxy. Use \fI\-\-negotiate\fP for enabling HTTP Negotiate (SPNEGO) with a remote
  2995. host.
  2996. Providing --proxy-negotiate multiple times has no extra effect.
  2997. Example:
  2998. .nf
  2999. curl --proxy-negotiate --proxy-user user:passwd -x proxy https://example.com
  3000. .fi
  3001. See also \fI\-\-proxy\-anyauth\fP, \fI\-\-proxy\-basic\fP and \fI\-\-proxy\-service\-name\fP.
  3002. .IP "\-\-proxy\-ntlm"
  3003. Use HTTP NTLM authentication when communicating with the given proxy. Use
  3004. \fI\-\-ntlm\fP for enabling NTLM with a remote host.
  3005. Providing --proxy-ntlm multiple times has no extra effect.
  3006. Example:
  3007. .nf
  3008. curl --proxy-ntlm --proxy-user user:passwd -x http://proxy https://example.com
  3009. .fi
  3010. See also \fI\-\-proxy\-negotiate\fP, \fI\-\-proxy\-anyauth\fP and \fI-U, \-\-proxy\-user\fP.
  3011. .IP "\-\-proxy\-pass <phrase>"
  3012. Passphrase for the private key for HTTPS proxy client certificate.
  3013. Equivalent to \fI\-\-pass\fP but used in HTTPS proxy context.
  3014. If --proxy-pass is provided several times, the last set value is used.
  3015. Example:
  3016. .nf
  3017. curl --proxy-pass secret --proxy-key here -x https://proxy https://example.com
  3018. .fi
  3019. See also \fI-x, \-\-proxy\fP and \fI\-\-proxy\-key\fP.
  3020. .IP "\-\-proxy\-pinnedpubkey <hashes>"
  3021. (TLS) Use the specified public key file (or hashes) to verify the proxy. This can be
  3022. a path to a file which contains a single public key in PEM or DER format, or
  3023. any number of base64 encoded sha256 hashes preceded by \(aqsha256//\(aq and
  3024. separated by \(aq;\(aq.
  3025. When negotiating a TLS or SSL connection, the server sends a certificate
  3026. indicating its identity. A public key is extracted from this certificate and
  3027. if it does not exactly match the public key provided to this option, curl
  3028. aborts the connection before sending or receiving any data.
  3029. If --proxy-pinnedpubkey is provided several times, the last set value is used.
  3030. Examples:
  3031. .nf
  3032. curl --proxy-pinnedpubkey keyfile https://example.com
  3033. curl --proxy-pinnedpubkey 'sha256//ce118b51897f4452dc' https://example.com
  3034. .fi
  3035. See also \fI\-\-pinnedpubkey\fP and \fI-x, \-\-proxy\fP.
  3036. .IP "\-\-proxy\-service\-name <name>"
  3037. Set the service name for SPNEGO when doing proxy authentication.
  3038. If --proxy-service-name is provided several times, the last set value is used.
  3039. Example:
  3040. .nf
  3041. curl --proxy-service-name "shrubbery" -x proxy https://example.com
  3042. .fi
  3043. See also \fI\-\-service\-name\fP, \fI-x, \-\-proxy\fP and \fI\-\-proxy\-negotiate\fP.
  3044. .IP "\-\-proxy\-ssl\-allow\-beast"
  3045. Do not work around a security flaw in the TLS1.0 protocol known as BEAST when
  3046. communicating to an HTTPS proxy. If this option is not used, the TLS layer may
  3047. use workarounds known to cause interoperability problems with some older
  3048. server implementations.
  3049. This option only changes how curl does TLS 1.0 with an HTTPS proxy and has no
  3050. effect on later TLS versions.
  3051. \fBWARNING\fP: this option loosens the TLS security, and by using this flag you
  3052. ask for exactly that.
  3053. Equivalent to \fI\-\-ssl\-allow\-beast\fP but used in HTTPS proxy context.
  3054. Providing --proxy-ssl-allow-beast multiple times has no extra effect.
  3055. Disable it again with \-\-no-proxy-ssl-allow-beast.
  3056. Example:
  3057. .nf
  3058. curl --proxy-ssl-allow-beast -x https://proxy https://example.com
  3059. .fi
  3060. See also \fI\-\-ssl\-allow\-beast\fP and \fI-x, \-\-proxy\fP.
  3061. .IP "\-\-proxy\-ssl\-auto\-client\-cert"
  3062. Same as \fI\-\-ssl\-auto\-client\-cert\fP but used in HTTPS proxy context.
  3063. This is only supported by Schannel.
  3064. Providing --proxy-ssl-auto-client-cert multiple times has no extra effect.
  3065. Disable it again with \-\-no-proxy-ssl-auto-client-cert.
  3066. Example:
  3067. .nf
  3068. curl --proxy-ssl-auto-client-cert -x https://proxy https://example.com
  3069. .fi
  3070. Added in 7.77.0. See also \fI\-\-ssl\-auto\-client\-cert\fP and \fI-x, \-\-proxy\fP.
  3071. .IP "\-\-proxy\-tls13\-ciphers <ciphersuite list>"
  3072. (TLS) Specify which cipher suites to use in the connection to your HTTPS proxy when
  3073. it negotiates TLS 1.3. The list of ciphers suites must specify valid ciphers.
  3074. Read up on TLS 1.3 cipher suite details on this URL:
  3075. https://curl.se/docs/ssl\-ciphers.html
  3076. This option is currently used only when curl is built to use OpenSSL 1.1.1 or
  3077. later. If you are using a different SSL backend you can try setting TLS 1.3
  3078. cipher suites by using the \fI\-\-proxy\-ciphers\fP option.
  3079. If --proxy-tls13-ciphers is provided several times, the last set value is used.
  3080. Example:
  3081. .nf
  3082. curl --proxy-tls13-ciphers TLS_AES_128_GCM_SHA256 -x proxy https://example.com
  3083. .fi
  3084. Added in 7.61.0. See also \fI\-\-tls13\-ciphers\fP, \fI\-\-curves\fP and \fI\-\-proxy\-ciphers\fP.
  3085. .IP "\-\-proxy\-tlsauthtype <type>"
  3086. Set TLS authentication type with HTTPS proxy. The only supported option is
  3087. \&"SRP", for TLS\-SRP (RFC 5054). This option works only if the underlying
  3088. libcurl is built with TLS\-SRP support.
  3089. Equivalent to \fI\-\-tlsauthtype\fP but used in HTTPS proxy context.
  3090. If --proxy-tlsauthtype is provided several times, the last set value is used.
  3091. Example:
  3092. .nf
  3093. curl --proxy-tlsauthtype SRP -x https://proxy https://example.com
  3094. .fi
  3095. See also \fI-x, \-\-proxy\fP, \fI\-\-proxy\-tlsuser\fP and \fI\-\-proxy\-tlspassword\fP.
  3096. .IP "\-\-proxy\-tlspassword <string>"
  3097. Set password to use with the TLS authentication method specified with
  3098. \fI\-\-proxy\-tlsauthtype\fP when using HTTPS proxy. Requires that \fI\-\-proxy\-tlsuser\fP is
  3099. set.
  3100. This option does not work with TLS 1.3.
  3101. Equivalent to \fI\-\-tlspassword\fP but used in HTTPS proxy context.
  3102. If --proxy-tlspassword is provided several times, the last set value is used.
  3103. Example:
  3104. .nf
  3105. curl --proxy-tlspassword passwd -x https://proxy https://example.com
  3106. .fi
  3107. See also \fI-x, \-\-proxy\fP and \fI\-\-proxy\-tlsuser\fP.
  3108. .IP "\-\-proxy\-tlsuser <name>"
  3109. Set username for use for HTTPS proxy with the TLS authentication method
  3110. specified with \fI\-\-proxy\-tlsauthtype\fP. Requires that \fI\-\-proxy\-tlspassword\fP also is
  3111. set.
  3112. This option does not work with TLS 1.3.
  3113. If --proxy-tlsuser is provided several times, the last set value is used.
  3114. Example:
  3115. .nf
  3116. curl --proxy-tlsuser smith -x https://proxy https://example.com
  3117. .fi
  3118. See also \fI-x, \-\-proxy\fP and \fI\-\-proxy\-tlspassword\fP.
  3119. .IP "\-\-proxy\-tlsv1"
  3120. Use at least TLS version 1.x when negotiating with an HTTPS proxy. That means
  3121. TLS version 1.0 or higher
  3122. Equivalent to \fI\-1, \-\-tlsv1\fP but for an HTTPS proxy context.
  3123. Providing --proxy-tlsv1 multiple times has no extra effect.
  3124. Example:
  3125. .nf
  3126. curl --proxy-tlsv1 -x https://proxy https://example.com
  3127. .fi
  3128. See also \fI-x, \-\-proxy\fP.
  3129. .IP "\-U, \-\-proxy\-user <user:password>"
  3130. Specify the username and password to use for proxy authentication.
  3131. If you use a Windows SSPI\-enabled curl binary and do either Negotiate or NTLM
  3132. authentication then you can tell curl to select the username and password from
  3133. your environment by specifying a single colon with this option: "\-U :".
  3134. On systems where it works, curl hides the given option argument from process
  3135. listings. This is not enough to protect credentials from possibly getting seen
  3136. by other users on the same system as they still are visible for a moment
  3137. before cleared. Such sensitive data should be retrieved from a file instead or
  3138. similar and never used in clear text in a command line.
  3139. If --proxy-user is provided several times, the last set value is used.
  3140. Example:
  3141. .nf
  3142. curl --proxy-user smith:secret -x proxy https://example.com
  3143. .fi
  3144. See also \fI\-\-proxy\-pass\fP.
  3145. .IP "\-\-proxy1.0 <host[:port]>"
  3146. Use the specified HTTP 1.0 proxy. If the port number is not specified, it is
  3147. assumed at port 1080.
  3148. The only difference between this and the HTTP proxy option \fI\-x, \-\-proxy\fP, is that
  3149. attempts to use CONNECT through the proxy specifies an HTTP 1.0 protocol
  3150. instead of the default HTTP 1.1.
  3151. Providing --proxy1.0 multiple times has no extra effect.
  3152. Example:
  3153. .nf
  3154. curl --proxy1.0 http://proxy https://example.com
  3155. .fi
  3156. See also \fI-x, \-\-proxy\fP, \fI\-\-socks5\fP and \fI\-\-preproxy\fP.
  3157. .IP "\-p, \-\-proxytunnel"
  3158. When an HTTP proxy is used \fI\-x, \-\-proxy\fP, this option makes curl tunnel the traffic
  3159. through the proxy. The tunnel approach is made with the HTTP proxy CONNECT
  3160. request and requires that the proxy allows direct connect to the remote port
  3161. number curl wants to tunnel through to.
  3162. To suppress proxy CONNECT response headers when curl is set to output headers
  3163. use \fI\-\-suppress\-connect\-headers\fP.
  3164. Providing --proxytunnel multiple times has no extra effect.
  3165. Disable it again with \-\-no-proxytunnel.
  3166. Example:
  3167. .nf
  3168. curl --proxytunnel -x http://proxy https://example.com
  3169. .fi
  3170. See also \fI-x, \-\-proxy\fP.
  3171. .IP "\-\-pubkey <key>"
  3172. (SFTP SCP) Public key filename. Allows you to provide your public key in this separate
  3173. file.
  3174. curl attempts to automatically extract the public key from the private key
  3175. file, so passing this option is generally not required. Note that this public
  3176. key extraction requires libcurl to be linked against a copy of libssh2 1.2.8
  3177. or higher that is itself linked against OpenSSL.
  3178. If --pubkey is provided several times, the last set value is used.
  3179. Example:
  3180. .nf
  3181. curl --pubkey file.pub sftp://example.com/
  3182. .fi
  3183. See also \fI\-\-pass\fP.
  3184. .IP "\-Q, \-\-quote <command>"
  3185. (FTP SFTP) Send an arbitrary command to the remote FTP or SFTP server. Quote commands are
  3186. sent BEFORE the transfer takes place (just after the initial \fBPWD\fP command
  3187. in an FTP transfer, to be exact). To make commands take place after a
  3188. successful transfer, prefix them with a dash \(aq\-\(aq.
  3189. (FTP only) To make commands be sent after curl has changed the working
  3190. directory, just before the file transfer command(s), prefix the command with a
  3191. \(aq+\(aq. This is not performed when a directory listing is performed.
  3192. You may specify any number of commands.
  3193. By default curl stops at first failure. To make curl continue even if the
  3194. command fails, prefix the command with an asterisk (*). Otherwise, if the
  3195. server returns failure for one of the commands, the entire operation is
  3196. aborted.
  3197. You must send syntactically correct FTP commands as RFC 959 defines to FTP
  3198. servers, or one of the commands listed below to SFTP servers.
  3199. SFTP is a binary protocol. Unlike for FTP, curl interprets SFTP quote commands
  3200. itself before sending them to the server. Filenames may be quoted shell\-style
  3201. to embed spaces or special characters. Following is the list of all supported
  3202. SFTP quote commands:
  3203. .RS
  3204. .IP "atime date file"
  3205. The atime command sets the last access time of the file named by the file
  3206. operand. The date expression can be all sorts of date strings, see the
  3207. \fIcurl_getdate(3)\fP man page for date expression details. (Added in 7.73.0)
  3208. .IP "chgrp group file"
  3209. The chgrp command sets the group ID of the file named by the file operand to
  3210. the group ID specified by the group operand. The group operand is a decimal
  3211. integer group ID.
  3212. .IP "chmod mode file"
  3213. The chmod command modifies the file mode bits of the specified file. The
  3214. mode operand is an octal integer mode number.
  3215. .IP "chown user file"
  3216. The chown command sets the owner of the file named by the file operand to the
  3217. user ID specified by the user operand. The user operand is a decimal
  3218. integer user ID.
  3219. .IP "ln source_file target_file"
  3220. The ln and symlink commands create a symbolic link at the target_file location
  3221. pointing to the source_file location.
  3222. .IP "mkdir directory_name"
  3223. The mkdir command creates the directory named by the directory_name operand.
  3224. .IP "mtime date file"
  3225. The mtime command sets the last modification time of the file named by the
  3226. file operand. The date expression can be all sorts of date strings, see the
  3227. \fIcurl_getdate(3)\fP man page for date expression details. (Added in 7.73.0)
  3228. .IP pwd
  3229. The pwd command returns the absolute path name of the current working directory.
  3230. .IP "rename source target"
  3231. The rename command renames the file or directory named by the source
  3232. operand to the destination path named by the target operand.
  3233. .IP "rm file"
  3234. The rm command removes the file specified by the file operand.
  3235. .IP "rmdir directory"
  3236. The rmdir command removes the directory entry specified by the directory
  3237. operand, provided it is empty.
  3238. .IP "symlink source_file target_file"
  3239. See ln.
  3240. .RE
  3241. .IP
  3242. --quote can be used several times in a command line
  3243. Example:
  3244. .nf
  3245. curl --quote "DELE file" ftp://example.com/foo
  3246. .fi
  3247. See also \fI-X, \-\-request\fP.
  3248. .IP "\-\-random\-file <file>"
  3249. Deprecated option. This option is ignored (added in 7.84.0). Prior to that it
  3250. only had an effect on curl if built to use old versions of OpenSSL.
  3251. Specify the path name to file containing random data. The data may be used to
  3252. seed the random engine for SSL connections.
  3253. If --random-file is provided several times, the last set value is used.
  3254. Example:
  3255. .nf
  3256. curl --random-file rubbish https://example.com
  3257. .fi
  3258. See also \fI\-\-egd\-file\fP.
  3259. .IP "\-r, \-\-range <range>"
  3260. (HTTP FTP SFTP FILE) Retrieve a byte range (i.e. a partial document) from an HTTP/1.1, FTP or SFTP
  3261. server or a local FILE. Ranges can be specified in a number of ways.
  3262. .RS
  3263. .IP 0-499
  3264. specifies the first 500 bytes
  3265. .IP 500-999
  3266. specifies the second 500 bytes
  3267. .IP -500
  3268. specifies the last 500 bytes
  3269. .IP 9500-
  3270. specifies the bytes from offset 9500 and forward
  3271. .IP 0-0,-1
  3272. specifies the first and last byte only(*)(HTTP)
  3273. .IP 100-199,500-599
  3274. specifies two separate 100\-byte ranges(*) (HTTP)
  3275. .RE
  3276. .IP
  3277. (*) = NOTE that these make the server reply with a multipart response, which
  3278. is returned as\-is by curl! Parsing or otherwise transforming this response is
  3279. the responsibility of the caller.
  3280. Only digit characters (0\-9) are valid in the \(aqstart\(aq and \(aqstop\(aq fields of the
  3281. \(aqstart\-stop\(aq range syntax. If a non\-digit character is given in the range, the
  3282. server\(aqs response is unspecified, depending on the server\(aqs configuration.
  3283. Many HTTP/1.1 servers do not have this feature enabled, so that when you
  3284. attempt to get a range, curl instead gets the whole document.
  3285. FTP and SFTP range downloads only support the simple \(aqstart\-stop\(aq syntax
  3286. (optionally with one of the numbers omitted). FTP use depends on the extended
  3287. FTP command SIZE.
  3288. If --range is provided several times, the last set value is used.
  3289. Example:
  3290. .nf
  3291. curl --range 22-44 https://example.com
  3292. .fi
  3293. See also \fI-C, \-\-continue\-at\fP and \fI-a, \-\-append\fP.
  3294. .IP "\-\-rate <max request rate>"
  3295. Specify the maximum transfer frequency you allow curl to use \- in number of
  3296. transfer starts per time unit (sometimes called request rate). Without this
  3297. option, curl starts the next transfer as fast as possible.
  3298. If given several URLs and a transfer completes faster than the allowed rate,
  3299. curl waits until the next transfer is started to maintain the requested
  3300. rate. This option has no effect when \fI\-Z, \-\-parallel\fP is used.
  3301. The request rate is provided as "N/U" where N is an integer number and U is a
  3302. time unit. Supported units are \(aqs\(aq (second), \(aqm\(aq (minute), \(aqh\(aq (hour) and \(aqd\(aq
  3303. /(day, as in a 24 hour unit). The default time unit, if no "/U" is provided,
  3304. is number of transfers per hour.
  3305. If curl is told to allow 10 requests per minute, it does not start the next
  3306. request until 6 seconds have elapsed since the previous transfer was started.
  3307. This function uses millisecond resolution. If the allowed frequency is set
  3308. more than 1000 per second, it instead runs unrestricted.
  3309. When retrying transfers, enabled with \fI\-\-retry\fP, the separate retry delay logic
  3310. is used and not this setting.
  3311. This option is global and does not need to be specified for each use of --next.
  3312. If --rate is provided several times, the last set value is used.
  3313. Examples:
  3314. .nf
  3315. curl --rate 2/s https://example.com ...
  3316. curl --rate 3/h https://example.com ...
  3317. curl --rate 14/m https://example.com ...
  3318. .fi
  3319. Added in 7.84.0. See also \fI\-\-limit\-rate\fP and \fI\-\-retry\-delay\fP.
  3320. .IP "\-\-raw"
  3321. (HTTP) When used, it disables all internal HTTP decoding of content or transfer
  3322. encodings and instead makes them passed on unaltered, raw.
  3323. Providing --raw multiple times has no extra effect.
  3324. Disable it again with \-\-no-raw.
  3325. Example:
  3326. .nf
  3327. curl --raw https://example.com
  3328. .fi
  3329. See also \fI\-\-tr\-encoding\fP.
  3330. .IP "\-e, \-\-referer <URL>"
  3331. (HTTP) Set the referrer URL in the HTTP request. This can also be set with the
  3332. \fI\-H, \-\-header\fP flag of course. When used with \fI\-L, \-\-location\fP you can append ";auto"" to
  3333. the \fI\-e, \-\-referer\fP URL to make curl automatically set the previous URL when it
  3334. follows a Location: header. The ";auto" string can be used alone, even if you
  3335. do not set an initial \fI\-e, \-\-referer\fP.
  3336. If --referer is provided several times, the last set value is used.
  3337. Examples:
  3338. .nf
  3339. curl --referer "https://fake.example" https://example.com
  3340. curl --referer "https://fake.example;auto" -L https://example.com
  3341. curl --referer ";auto" -L https://example.com
  3342. .fi
  3343. See also \fI-A, \-\-user\-agent\fP and \fI-H, \-\-header\fP.
  3344. .IP "\-J, \-\-remote\-header\-name"
  3345. (HTTP) Tell the \fI\-O, \-\-remote\-name\fP option to use the server\-specified Content\-Disposition
  3346. filename instead of extracting a filename from the URL. If the server\-provided
  3347. filename contains a path, that is stripped off before the filename is used.
  3348. The file is saved in the current directory, or in the directory specified with
  3349. \fI\-\-output\-dir\fP.
  3350. If the server specifies a filename and a file with that name already exists in
  3351. the destination directory, it is not overwritten and an error occurs \- unless
  3352. you allow it by using the \fI\-\-clobber\fP option. If the server does not specify a
  3353. filename then this option has no effect.
  3354. There is no attempt to decode %\-sequences (yet) in the provided filename, so
  3355. this option may provide you with rather unexpected filenames.
  3356. This feature uses the name from the "filename" field, it does not yet support
  3357. the "filename*" field (filenames with explicit character sets).
  3358. \fBWARNING\fP: Exercise judicious use of this option, especially on Windows. A
  3359. rogue server could send you the name of a DLL or other file that could be
  3360. loaded automatically by Windows or some third party software.
  3361. Providing --remote-header-name multiple times has no extra effect.
  3362. Disable it again with \-\-no-remote-header-name.
  3363. Example:
  3364. .nf
  3365. curl -OJ https://example.com/file
  3366. .fi
  3367. See also \fI-O, \-\-remote\-name\fP.
  3368. .IP "\-O, \-\-remote\-name"
  3369. Write output to a local file named like the remote file we get. (Only the file
  3370. part of the remote file is used, the path is cut off.)
  3371. The file is saved in the current working directory. If you want the file saved
  3372. in a different directory, make sure you change the current working directory
  3373. before invoking curl with this option or use \fI\-\-output\-dir\fP.
  3374. The remote filename to use for saving is extracted from the given URL, nothing
  3375. else, and if it already exists it is overwritten. If you want the server to be
  3376. able to choose the filename refer to \fI\-J, \-\-remote\-header\-name\fP which can be used in
  3377. addition to this option. If the server chooses a filename and that name
  3378. already exists it is not overwritten.
  3379. There is no URL decoding done on the filename. If it has %20 or other URL
  3380. encoded parts of the name, they end up as\-is as filename.
  3381. You may use this option as many times as the number of URLs you have.
  3382. --remote-name is associated with a single URL. Use it once per URL when you use several URLs in a command line.
  3383. Examples:
  3384. .nf
  3385. curl -O https://example.com/filename
  3386. curl -O https://example.com/filename -O https://example.com/file2
  3387. .fi
  3388. See also \fI\-\-remote\-name\-all\fP, \fI\-\-output\-dir\fP and \fI-J, \-\-remote\-header\-name\fP.
  3389. .IP "\-\-remote\-name\-all"
  3390. Change the default action for all given URLs to be dealt with as if
  3391. \fI\-O, \-\-remote\-name\fP were used for each one. If you want to disable that for a
  3392. specific URL after \fI\-\-remote\-name\-all\fP has been used, you must use "\-o \-" or
  3393. \fI\-\-no\-remote\-name\fP.
  3394. Providing --remote-name-all multiple times has no extra effect.
  3395. Disable it again with \-\-no-remote-name-all.
  3396. Example:
  3397. .nf
  3398. curl --remote-name-all ftp://example.com/file1 ftp://example.com/file2
  3399. .fi
  3400. See also \fI-O, \-\-remote\-name\fP.
  3401. .IP "\-R, \-\-remote\-time"
  3402. Makes curl attempt to figure out the timestamp of the remote file that is
  3403. getting downloaded, and if that is available make the local file get that same
  3404. timestamp.
  3405. Providing --remote-time multiple times has no extra effect.
  3406. Disable it again with \-\-no-remote-time.
  3407. Example:
  3408. .nf
  3409. curl --remote-time -o foo https://example.com
  3410. .fi
  3411. See also \fI-O, \-\-remote\-name\fP and \fI-z, \-\-time\-cond\fP.
  3412. .IP "\-\-remove\-on\-error"
  3413. Remove output file if an error occurs. If curl returns an error when told to
  3414. save output in a local file. This prevents curl from leaving a partial file in
  3415. the case of an error during transfer.
  3416. If the output is not a regular file, this option has no effect.
  3417. Providing --remove-on-error multiple times has no extra effect.
  3418. Disable it again with \-\-no-remove-on-error.
  3419. Example:
  3420. .nf
  3421. curl --remove-on-error -o output https://example.com
  3422. .fi
  3423. Added in 7.83.0. See also \fI-f, \-\-fail\fP.
  3424. .IP "\-X, \-\-request <method>"
  3425. Change the method to use when starting the transfer.
  3426. curl passes on the verbatim string you give it in the request without any
  3427. filter or other safe guards. That includes white space and control characters.
  3428. .RS
  3429. .IP HTTP
  3430. Specifies a custom request method to use when communicating with the HTTP
  3431. server. The specified request method is used instead of the method otherwise
  3432. used (which defaults to \fIGET\fP). Read the HTTP 1.1 specification for details
  3433. and explanations. Common additional HTTP requests include \fIPUT\fP and \fIDELETE\fP,
  3434. while related technologies like WebDAV offers \fIPROPFIND\fP, \fICOPY\fP, \fIMOVE\fP and
  3435. more.
  3436. Normally you do not need this option. All sorts of \fIGET\fP, \fIHEAD\fP, \fIPOST\fP and
  3437. \fIPUT\fP requests are rather invoked by using dedicated command line options.
  3438. This option only changes the actual word used in the HTTP request, it does not
  3439. alter the way curl behaves. For example if you want to make a proper HEAD
  3440. request, using \-X HEAD does not suffice. You need to use the \fI\-I, \-\-head\fP option.
  3441. The method string you set with \fI\-X, \-\-request\fP is used for all requests, which
  3442. if you for example use \fI\-L, \-\-location\fP may cause unintended side\-effects when curl
  3443. does not change request method according to the HTTP 30x response codes \- and
  3444. similar.
  3445. .IP FTP
  3446. Specifies a custom FTP command to use instead of \fILIST\fP when doing file lists
  3447. with FTP.
  3448. .IP POP3
  3449. Specifies a custom POP3 command to use instead of \fILIST\fP or \fIRETR\fP.
  3450. .IP IMAP
  3451. Specifies a custom IMAP command to use instead of \fILIST\fP.
  3452. .IP SMTP
  3453. Specifies a custom SMTP command to use instead of \fIHELP\fP or \fBVRFY\fP.
  3454. .RE
  3455. .IP
  3456. If --request is provided several times, the last set value is used.
  3457. Examples:
  3458. .nf
  3459. curl -X "DELETE" https://example.com
  3460. curl -X NLST ftp://example.com/
  3461. .fi
  3462. See also \fI\-\-request\-target\fP.
  3463. .IP "\-\-request\-target <path>"
  3464. (HTTP) Use an alternative target (path) instead of using the path as provided in the
  3465. URL. Particularly useful when wanting to issue HTTP requests without leading
  3466. slash or other data that does not follow the regular URL pattern, like
  3467. \&"OPTIONS *".
  3468. curl passes on the verbatim string you give it its the request without any
  3469. filter or other safe guards. That includes white space and control characters.
  3470. If --request-target is provided several times, the last set value is used.
  3471. Example:
  3472. .nf
  3473. curl --request-target "*" -X OPTIONS https://example.com
  3474. .fi
  3475. See also \fI-X, \-\-request\fP.
  3476. .IP "\-\-resolve <[+]host:port:addr[,addr]...>"
  3477. Provide a custom address for a specific host and port pair. Using this, you
  3478. can make the curl requests(s) use a specified address and prevent the
  3479. otherwise normally resolved address to be used. Consider it a sort of
  3480. /etc/hosts alternative provided on the command line. The port number should be
  3481. the number used for the specific protocol the host is used for. It means
  3482. you need several entries if you want to provide address for the same host but
  3483. different ports.
  3484. By specifying "*" as host you can tell curl to resolve any host and specific
  3485. port pair to the specified address. Wildcard is resolved last so any \fI\-\-resolve\fP
  3486. with a specific host and port is used first.
  3487. The provided address set by this option is used even if \fI\-4, \-\-ipv4\fP or \fI\-6, \-\-ipv6\fP is
  3488. set to make curl use another IP version.
  3489. By prefixing the host with a \(aq+\(aq you can make the entry time out after curl\(aqs
  3490. default timeout (1 minute). Note that this only makes sense for long running
  3491. parallel transfers with a lot of files. In such cases, if this option is used
  3492. curl tries to resolve the host as it normally would once the timeout has
  3493. expired.
  3494. To redirect connects from a specific hostname or any hostname, independently
  3495. of port number, consider the \fI\-\-connect\-to\fP option.
  3496. Support for resolving with wildcard was added in 7.64.0.
  3497. Support for the \(aq+\(aq prefix was added in 7.75.0.
  3498. --resolve can be used several times in a command line
  3499. Example:
  3500. .nf
  3501. curl --resolve example.com:443:127.0.0.1 https://example.com
  3502. .fi
  3503. See also \fI\-\-connect\-to\fP and \fI\-\-alt\-svc\fP.
  3504. .IP "\-\-retry <num>"
  3505. If a transient error is returned when curl tries to perform a transfer, it
  3506. retries this number of times before giving up. Setting the number to 0
  3507. makes curl do no retries (which is the default). Transient error means either:
  3508. a timeout, an FTP 4xx response code or an HTTP 408, 429, 500, 502, 503 or 504
  3509. response code.
  3510. When curl is about to retry a transfer, it first waits one second and then for
  3511. all forthcoming retries it doubles the waiting time until it reaches 10
  3512. minutes which then remains delay between the rest of the retries. By using
  3513. \fI\-\-retry\-delay\fP you disable this exponential backoff algorithm. See also
  3514. \fI\-\-retry\-max\-time\fP to limit the total time allowed for retries.
  3515. curl complies with the Retry\-After: response header if one was present to know
  3516. when to issue the next retry (added in 7.66.0).
  3517. If --retry is provided several times, the last set value is used.
  3518. Example:
  3519. .nf
  3520. curl --retry 7 https://example.com
  3521. .fi
  3522. See also \fI\-\-retry\-max\-time\fP.
  3523. .IP "\-\-retry\-all\-errors"
  3524. Retry on any error. This option is used together with \fI\-\-retry\fP.
  3525. This option is the "sledgehammer" of retrying. Do not use this option by
  3526. default (for example in your \fBcurlrc\fP), there may be unintended consequences
  3527. such as sending or receiving duplicate data. Do not use with redirected input
  3528. or output. You might be better off handling your unique problems in a shell
  3529. script. Please read the example below.
  3530. \fBWARNING\fP: For server compatibility curl attempts to retry failed flaky
  3531. transfers as close as possible to how they were started, but this is not
  3532. possible with redirected input or output. For example, before retrying it
  3533. removes output data from a failed partial transfer that was written to an
  3534. output file. However this is not true of data redirected to a | pipe or >
  3535. file, which are not reset. We strongly suggest you do not parse or record
  3536. output via redirect in combination with this option, since you may receive
  3537. duplicate data.
  3538. By default curl does not return error for transfers with an HTTP response code
  3539. that indicates an HTTP error, if the transfer was successful. For example, if
  3540. a server replies 404 Not Found and the reply is fully received then that is
  3541. not an error. When \fI\-\-retry\fP is used then curl retries on some HTTP response
  3542. codes that indicate transient HTTP errors, but that does not include most 4xx
  3543. response codes such as 404. If you want to retry on all response codes that
  3544. indicate HTTP errors (4xx and 5xx) then combine with \fI\-f, \-\-fail\fP.
  3545. Providing --retry-all-errors multiple times has no extra effect.
  3546. Disable it again with \-\-no-retry-all-errors.
  3547. Example:
  3548. .nf
  3549. curl --retry 5 --retry-all-errors https://example.com
  3550. .fi
  3551. Added in 7.71.0. See also \fI\-\-retry\fP.
  3552. .IP "\-\-retry\-connrefused"
  3553. In addition to the other conditions, consider ECONNREFUSED as a transient
  3554. error too for \fI\-\-retry\fP. This option is used together with \fI\-\-retry\fP.
  3555. Providing --retry-connrefused multiple times has no extra effect.
  3556. Disable it again with \-\-no-retry-connrefused.
  3557. Example:
  3558. .nf
  3559. curl --retry-connrefused --retry 7 https://example.com
  3560. .fi
  3561. See also \fI\-\-retry\fP and \fI\-\-retry\-all\-errors\fP.
  3562. .IP "\-\-retry\-delay <seconds>"
  3563. Make curl sleep this amount of time before each retry when a transfer has
  3564. failed with a transient error (it changes the default backoff time algorithm
  3565. between retries). This option is only interesting if \fI\-\-retry\fP is also
  3566. used. Setting this delay to zero makes curl use the default backoff time.
  3567. If --retry-delay is provided several times, the last set value is used.
  3568. Example:
  3569. .nf
  3570. curl --retry-delay 5 --retry 7 https://example.com
  3571. .fi
  3572. See also \fI\-\-retry\fP.
  3573. .IP "\-\-retry\-max\-time <seconds>"
  3574. The retry timer is reset before the first transfer attempt. Retries are done
  3575. as usual (see \fI\-\-retry\fP) as long as the timer has not reached this given
  3576. limit. Notice that if the timer has not reached the limit, the request is
  3577. made and while performing, it may take longer than this given time period. To
  3578. limit a single request\(aqs maximum time, use \fI\-m, \-\-max\-time\fP. Set this option to zero
  3579. to not timeout retries.
  3580. If --retry-max-time is provided several times, the last set value is used.
  3581. Example:
  3582. .nf
  3583. curl --retry-max-time 30 --retry 10 https://example.com
  3584. .fi
  3585. See also \fI\-\-retry\fP.
  3586. .IP "\-\-sasl\-authzid <identity>"
  3587. Use this authorization identity (\fBauthzid\fP), during SASL PLAIN
  3588. authentication, in addition to the authentication identity (\fBauthcid\fP) as
  3589. specified by \fI\-u, \-\-user\fP.
  3590. If the option is not specified, the server derives the \fBauthzid\fP from the
  3591. \fBauthcid\fP, but if specified, and depending on the server implementation, it
  3592. may be used to access another user\(aqs inbox, that the user has been granted
  3593. access to, or a shared mailbox for example.
  3594. If --sasl-authzid is provided several times, the last set value is used.
  3595. Example:
  3596. .nf
  3597. curl --sasl-authzid zid imap://example.com/
  3598. .fi
  3599. Added in 7.66.0. See also \fI\-\-login\-options\fP.
  3600. .IP "\-\-sasl\-ir"
  3601. Enable initial response in SASL authentication.
  3602. Providing --sasl-ir multiple times has no extra effect.
  3603. Disable it again with \-\-no-sasl-ir.
  3604. Example:
  3605. .nf
  3606. curl --sasl-ir imap://example.com/
  3607. .fi
  3608. See also \fI\-\-sasl\-authzid\fP.
  3609. .IP "\-\-service\-name <name>"
  3610. Set the service name for SPNEGO.
  3611. If --service-name is provided several times, the last set value is used.
  3612. Example:
  3613. .nf
  3614. curl --service-name sockd/server https://example.com
  3615. .fi
  3616. See also \fI\-\-negotiate\fP and \fI\-\-proxy\-service\-name\fP.
  3617. .IP "\-S, \-\-show\-error"
  3618. When used with \fI\-s, \-\-silent\fP, it makes curl show an error message if it fails.
  3619. This option is global and does not need to be specified for each use of --next.
  3620. Providing --show-error multiple times has no extra effect.
  3621. Disable it again with \-\-no-show-error.
  3622. Example:
  3623. .nf
  3624. curl --show-error --silent https://example.com
  3625. .fi
  3626. See also \fI\-\-no\-progress\-meter\fP.
  3627. .IP "\-s, \-\-silent"
  3628. Silent or quiet mode. Do not show progress meter or error messages. Makes Curl
  3629. mute. It still outputs the data you ask for, potentially even to the
  3630. terminal/stdout unless you redirect it.
  3631. Use \fI\-S, \-\-show\-error\fP in addition to this option to disable progress meter but
  3632. still show error messages.
  3633. Providing --silent multiple times has no extra effect.
  3634. Disable it again with \-\-no-silent.
  3635. Example:
  3636. .nf
  3637. curl -s https://example.com
  3638. .fi
  3639. See also \fI-v, \-\-verbose\fP, \fI\-\-stderr\fP and \fI\-\-no\-progress\-meter\fP.
  3640. .IP "\-\-socks4 <host[:port]>"
  3641. Use the specified SOCKS4 proxy. If the port number is not specified, it is
  3642. assumed at port 1080. Using this socket type make curl resolve the hostname
  3643. and passing the address on to the proxy.
  3644. To specify proxy on a unix domain socket, use localhost for host, e.g.
  3645. \&"socks4://localhost/path/to/socket.sock"
  3646. This option overrides any previous use of \fI\-x, \-\-proxy\fP, as they are mutually
  3647. exclusive.
  3648. This option is superfluous since you can specify a socks4 proxy with \fI\-x, \-\-proxy\fP
  3649. using a socks4:// protocol prefix.
  3650. \fI\-\-preproxy\fP can be used to specify a SOCKS proxy at the same time proxy is used
  3651. with an HTTP/HTTPS proxy. In such a case, curl first
  3652. connects to the SOCKS proxy and then connects (through SOCKS) to the HTTP or
  3653. HTTPS proxy.
  3654. If --socks4 is provided several times, the last set value is used.
  3655. Example:
  3656. .nf
  3657. curl --socks4 hostname:4096 https://example.com
  3658. .fi
  3659. See also \fI\-\-socks4a\fP, \fI\-\-socks5\fP and \fI\-\-socks5\-hostname\fP.
  3660. .IP "\-\-socks4a <host[:port]>"
  3661. Use the specified SOCKS4a proxy. If the port number is not specified, it is
  3662. assumed at port 1080. This asks the proxy to resolve the hostname.
  3663. To specify proxy on a unix domain socket, use localhost for host, e.g.
  3664. \&"socks4a://localhost/path/to/socket.sock"
  3665. This option overrides any previous use of \fI\-x, \-\-proxy\fP, as they are mutually
  3666. exclusive.
  3667. This option is superfluous since you can specify a socks4a proxy with \fI\-x, \-\-proxy\fP
  3668. using a socks4a:// protocol prefix.
  3669. \fI\-\-preproxy\fP can be used to specify a SOCKS proxy at the same time \fI\-x, \-\-proxy\fP is
  3670. used with an HTTP/HTTPS proxy. In such a case, curl first
  3671. connects to the SOCKS proxy and then connects (through SOCKS) to the HTTP or
  3672. HTTPS proxy.
  3673. If --socks4a is provided several times, the last set value is used.
  3674. Example:
  3675. .nf
  3676. curl --socks4a hostname:4096 https://example.com
  3677. .fi
  3678. See also \fI\-\-socks4\fP, \fI\-\-socks5\fP and \fI\-\-socks5\-hostname\fP.
  3679. .IP "\-\-socks5 <host[:port]>"
  3680. Use the specified SOCKS5 proxy \- but resolve the hostname locally. If the
  3681. port number is not specified, it is assumed at port 1080.
  3682. To specify proxy on a unix domain socket, use localhost for host, e.g.
  3683. \&"socks5://localhost/path/to/socket.sock"
  3684. This option overrides any previous use of \fI\-x, \-\-proxy\fP, as they are mutually
  3685. exclusive.
  3686. This option is superfluous since you can specify a socks5 proxy with \fI\-x, \-\-proxy\fP
  3687. using a socks5:// protocol prefix.
  3688. \fI\-\-preproxy\fP can be used to specify a SOCKS proxy at the same time \fI\-x, \-\-proxy\fP is
  3689. used with an HTTP/HTTPS proxy. In such a case, curl first
  3690. connects to the SOCKS proxy and then connects (through SOCKS) to the HTTP or
  3691. HTTPS proxy.
  3692. This option does not work with FTPS or LDAP.
  3693. If --socks5 is provided several times, the last set value is used.
  3694. Example:
  3695. .nf
  3696. curl --socks5 proxy.example:7000 https://example.com
  3697. .fi
  3698. See also \fI\-\-socks5\-hostname\fP and \fI\-\-socks4a\fP.
  3699. .IP "\-\-socks5\-basic"
  3700. Use username/password authentication when connecting to a SOCKS5 proxy. The
  3701. username/password authentication is enabled by default. Use \fI\-\-socks5\-gssapi\fP to
  3702. force GSS\-API authentication to SOCKS5 proxies.
  3703. Providing --socks5-basic multiple times has no extra effect.
  3704. Example:
  3705. .nf
  3706. curl --socks5-basic --socks5 hostname:4096 https://example.com
  3707. .fi
  3708. See also \fI\-\-socks5\fP.
  3709. .IP "\-\-socks5\-gssapi"
  3710. Use GSS\-API authentication when connecting to a SOCKS5 proxy. The GSS\-API
  3711. authentication is enabled by default (if curl is compiled with GSS\-API
  3712. support). Use \fI\-\-socks5\-basic\fP to force username/password authentication to
  3713. SOCKS5 proxies.
  3714. Providing --socks5-gssapi multiple times has no extra effect.
  3715. Disable it again with \-\-no-socks5-gssapi.
  3716. Example:
  3717. .nf
  3718. curl --socks5-gssapi --socks5 hostname:4096 https://example.com
  3719. .fi
  3720. See also \fI\-\-socks5\fP.
  3721. .IP "\-\-socks5\-gssapi\-nec"
  3722. As part of the GSS\-API negotiation a protection mode is negotiated. RFC 1961
  3723. says in section 4.3/4.4 it should be protected, but the NEC reference
  3724. implementation does not. The option \fI\-\-socks5\-gssapi\-nec\fP allows the
  3725. unprotected exchange of the protection mode negotiation.
  3726. Providing --socks5-gssapi-nec multiple times has no extra effect.
  3727. Disable it again with \-\-no-socks5-gssapi-nec.
  3728. Example:
  3729. .nf
  3730. curl --socks5-gssapi-nec --socks5 hostname:4096 https://example.com
  3731. .fi
  3732. See also \fI\-\-socks5\fP.
  3733. .IP "\-\-socks5\-gssapi\-service <name>"
  3734. Set the service name for a socks server. Default is \fBrcmd/server\-fqdn\fP.
  3735. If --socks5-gssapi-service is provided several times, the last set value is used.
  3736. Example:
  3737. .nf
  3738. curl --socks5-gssapi-service sockd --socks5 hostname:4096 https://example.com
  3739. .fi
  3740. See also \fI\-\-socks5\fP.
  3741. .IP "\-\-socks5\-hostname <host[:port]>"
  3742. Use the specified SOCKS5 proxy (and let the proxy resolve the hostname). If
  3743. the port number is not specified, it is assumed at port 1080.
  3744. To specify proxy on a unix domain socket, use localhost for host, e.g.
  3745. \&"socks5h://localhost/path/to/socket.sock"
  3746. This option overrides any previous use of \fI\-x, \-\-proxy\fP, as they are mutually
  3747. exclusive.
  3748. This option is superfluous since you can specify a socks5 hostname proxy with
  3749. \fI\-x, \-\-proxy\fP using a socks5h:// protocol prefix.
  3750. \fI\-\-preproxy\fP can be used to specify a SOCKS proxy at the same time \fI\-x, \-\-proxy\fP is
  3751. used with an HTTP/HTTPS proxy. In such a case, curl first
  3752. connects to the SOCKS proxy and then connects (through SOCKS) to the HTTP or
  3753. HTTPS proxy.
  3754. If --socks5-hostname is provided several times, the last set value is used.
  3755. Example:
  3756. .nf
  3757. curl --socks5-hostname proxy.example:7000 https://example.com
  3758. .fi
  3759. See also \fI\-\-socks5\fP and \fI\-\-socks4a\fP.
  3760. .IP "\-Y, \-\-speed\-limit <speed>"
  3761. If a transfer is slower than this set speed (in bytes per second) for a given
  3762. number of seconds, it gets aborted. The time period is set with \fI\-y, \-\-speed\-time\fP
  3763. and is 30 seconds by default.
  3764. If --speed-limit is provided several times, the last set value is used.
  3765. Example:
  3766. .nf
  3767. curl --speed-limit 300 --speed-time 10 https://example.com
  3768. .fi
  3769. See also \fI-y, \-\-speed\-time\fP, \fI\-\-limit\-rate\fP and \fI-m, \-\-max\-time\fP.
  3770. .IP "\-y, \-\-speed\-time <seconds>"
  3771. If a transfer runs slower than speed\-limit bytes per second during a
  3772. speed\-time period, the transfer is aborted. If speed\-time is used, the default
  3773. speed\-limit is 1 unless set with \fI\-Y, \-\-speed\-limit\fP.
  3774. This option controls transfers (in both directions) but does not affect slow
  3775. connects etc. If this is a concern for you, try the \fI\-\-connect\-timeout\fP option.
  3776. If --speed-time is provided several times, the last set value is used.
  3777. Example:
  3778. .nf
  3779. curl --speed-limit 300 --speed-time 10 https://example.com
  3780. .fi
  3781. See also \fI-Y, \-\-speed\-limit\fP and \fI\-\-limit\-rate\fP.
  3782. .IP "\-\-ssl"
  3783. (FTP IMAP POP3 SMTP LDAP) Warning: this is considered an insecure option. Consider using \fI\-\-ssl\-reqd\fP
  3784. instead to be sure curl upgrades to a secure connection.
  3785. Try to use SSL/TLS for the connection \- often referred to as STARTTLS or STLS
  3786. because of the involved commands. Reverts to a non\-secure connection if the
  3787. server does not support SSL/TLS. See also \fI\-\-ftp\-ssl\-control\fP and \fI\-\-ssl\-reqd\fP for
  3788. different levels of encryption required.
  3789. This option is handled in LDAP (added in 7.81.0). It is fully supported by the
  3790. OpenLDAP backend and ignored by the generic ldap backend.
  3791. Please note that a server may close the connection if the negotiation does
  3792. not succeed.
  3793. This option was formerly known as \fI\-\-ftp\-ssl\fP. That option
  3794. name can still be used but might be removed in a future version.
  3795. Providing --ssl multiple times has no extra effect.
  3796. Disable it again with \-\-no-ssl.
  3797. Example:
  3798. .nf
  3799. curl --ssl pop3://example.com/
  3800. .fi
  3801. See also \fI\-\-ssl\-reqd\fP, \fI-k, \-\-insecure\fP and \fI\-\-ciphers\fP.
  3802. .IP "\-\-ssl\-allow\-beast"
  3803. (TLS) Do not work around a security flaw in the TLS1.0 protocol known as BEAST. If
  3804. this option is not used, the TLS layer may use workarounds known to cause
  3805. interoperability problems with some older server implementations.
  3806. This option only changes how curl does TLS 1.0 and has no effect on later TLS
  3807. versions.
  3808. \fBWARNING\fP: this option loosens the TLS security, and by using this flag you
  3809. ask for exactly that.
  3810. Providing --ssl-allow-beast multiple times has no extra effect.
  3811. Disable it again with \-\-no-ssl-allow-beast.
  3812. Example:
  3813. .nf
  3814. curl --ssl-allow-beast https://example.com
  3815. .fi
  3816. See also \fI\-\-proxy\-ssl\-allow\-beast\fP and \fI-k, \-\-insecure\fP.
  3817. .IP "\-\-ssl\-auto\-client\-cert"
  3818. (TLS) (Schannel) Automatically locate and use a client certificate for
  3819. authentication, when requested by the server. Since the server can request any
  3820. certificate that supports client authentication in the OS certificate store it
  3821. could be a privacy violation and unexpected.
  3822. Providing --ssl-auto-client-cert multiple times has no extra effect.
  3823. Disable it again with \-\-no-ssl-auto-client-cert.
  3824. Example:
  3825. .nf
  3826. curl --ssl-auto-client-cert https://example.com
  3827. .fi
  3828. Added in 7.77.0. See also \fI\-\-proxy\-ssl\-auto\-client\-cert\fP.
  3829. .IP "\-\-ssl\-no\-revoke"
  3830. (TLS) (Schannel) Disable certificate revocation checks. WARNING: this option loosens
  3831. the SSL security, and by using this flag you ask for exactly that.
  3832. Providing --ssl-no-revoke multiple times has no extra effect.
  3833. Disable it again with \-\-no-ssl-no-revoke.
  3834. Example:
  3835. .nf
  3836. curl --ssl-no-revoke https://example.com
  3837. .fi
  3838. See also \fI\-\-crlfile\fP.
  3839. .IP "\-\-ssl\-reqd"
  3840. (FTP IMAP POP3 SMTP LDAP) Require SSL/TLS for the connection \- often referred to as STARTTLS or STLS
  3841. because of the involved commands. Terminates the connection if the transfer
  3842. cannot be upgraded to use SSL/TLS.
  3843. This option is handled in LDAP (added in 7.81.0). It is fully supported by the
  3844. OpenLDAP backend and rejected by the generic ldap backend if explicit TLS is
  3845. required.
  3846. This option is unnecessary if you use a URL scheme that in itself implies
  3847. immediate and implicit use of TLS, like for FTPS, IMAPS, POP3S, SMTPS and
  3848. LDAPS. Such a transfer always fails if the TLS handshake does not work.
  3849. This option was formerly known as \fI\-\-ftp\-ssl\-reqd\fP.
  3850. Providing --ssl-reqd multiple times has no extra effect.
  3851. Disable it again with \-\-no-ssl-reqd.
  3852. Example:
  3853. .nf
  3854. curl --ssl-reqd ftp://example.com
  3855. .fi
  3856. See also \fI\-\-ssl\fP and \fI-k, \-\-insecure\fP.
  3857. .IP "\-\-ssl\-revoke\-best\-effort"
  3858. (TLS) (Schannel) Ignore certificate revocation checks when they failed due to
  3859. missing/offline distribution points for the revocation check lists.
  3860. Providing --ssl-revoke-best-effort multiple times has no extra effect.
  3861. Disable it again with \-\-no-ssl-revoke-best-effort.
  3862. Example:
  3863. .nf
  3864. curl --ssl-revoke-best-effort https://example.com
  3865. .fi
  3866. Added in 7.70.0. See also \fI\-\-crlfile\fP and \fI-k, \-\-insecure\fP.
  3867. .IP "\-2, \-\-sslv2"
  3868. (SSL) This option previously asked curl to use SSLv2, but is now ignored
  3869. (added in 7.77.0). SSLv2 is widely considered insecure (see RFC 6176).
  3870. Providing --sslv2 multiple times has no extra effect.
  3871. Example:
  3872. .nf
  3873. curl --sslv2 https://example.com
  3874. .fi
  3875. \fI-2, \-\-sslv2\fP requires that libcurl is built to support TLS.
  3876. This option is mutually exclusive with \fI-3, \-\-sslv3\fP, \fI-1, \-\-tlsv1\fP, \fI\-\-tlsv1.1\fP and \fI\-\-tlsv1.2\fP.
  3877. See also \fI\-\-http1.1\fP and \fI\-\-http2\fP.
  3878. .IP "\-3, \-\-sslv3"
  3879. (SSL) This option previously asked curl to use SSLv3, but is now ignored
  3880. (added in 7.77.0). SSLv3 is widely considered insecure (see RFC 7568).
  3881. Providing --sslv3 multiple times has no extra effect.
  3882. Example:
  3883. .nf
  3884. curl --sslv3 https://example.com
  3885. .fi
  3886. \fI-3, \-\-sslv3\fP requires that libcurl is built to support TLS.
  3887. This option is mutually exclusive with \fI-2, \-\-sslv2\fP, \fI-1, \-\-tlsv1\fP, \fI\-\-tlsv1.1\fP and \fI\-\-tlsv1.2\fP.
  3888. See also \fI\-\-http1.1\fP and \fI\-\-http2\fP.
  3889. .IP "\-\-stderr <file>"
  3890. Redirect all writes to stderr to the specified file instead. If the filename
  3891. is a plain \(aq\-\(aq, it is instead written to stdout.
  3892. This option is global and does not need to be specified for each use of --next.
  3893. If --stderr is provided several times, the last set value is used.
  3894. Example:
  3895. .nf
  3896. curl --stderr output.txt https://example.com
  3897. .fi
  3898. See also \fI-v, \-\-verbose\fP and \fI-s, \-\-silent\fP.
  3899. .IP "\-\-styled\-output"
  3900. Enable automatic use of bold font styles when writing HTTP headers to the
  3901. terminal. Use \fI\-\-no\-styled\-output\fP to switch them off.
  3902. Styled output requires a terminal that supports bold fonts. This feature is
  3903. not present on curl for Windows due to lack of this capability.
  3904. This option is global and does not need to be specified for each use of --next.
  3905. Providing --styled-output multiple times has no extra effect.
  3906. Disable it again with \-\-no-styled-output.
  3907. Example:
  3908. .nf
  3909. curl --styled-output -I https://example.com
  3910. .fi
  3911. Added in 7.61.0. See also \fI-I, \-\-head\fP and \fI-v, \-\-verbose\fP.
  3912. .IP "\-\-suppress\-connect\-headers"
  3913. When \fI\-p, \-\-proxytunnel\fP is used and a CONNECT request is made do not output proxy
  3914. CONNECT response headers. This option is meant to be used with \fI\-D, \-\-dump\-header\fP or
  3915. \fI\-i, \-\-include\fP which are used to show protocol headers in the output. It has no
  3916. effect on debug options such as \fI\-v, \-\-verbose\fP or \fI\-\-trace\fP, or any statistics.
  3917. Providing --suppress-connect-headers multiple times has no extra effect.
  3918. Disable it again with \-\-no-suppress-connect-headers.
  3919. Example:
  3920. .nf
  3921. curl --suppress-connect-headers --include -x proxy https://example.com
  3922. .fi
  3923. See also \fI-D, \-\-dump\-header\fP, \fI-i, \-\-include\fP and \fI-p, \-\-proxytunnel\fP.
  3924. .IP "\-\-tcp\-fastopen"
  3925. Enable use of TCP Fast Open (RFC 7413). TCP Fast Open is a TCP extension that
  3926. allows data to get sent earlier over the connection (before the final
  3927. handshake ACK) if the client and server have been connected previously.
  3928. Providing --tcp-fastopen multiple times has no extra effect.
  3929. Disable it again with \-\-no-tcp-fastopen.
  3930. Example:
  3931. .nf
  3932. curl --tcp-fastopen https://example.com
  3933. .fi
  3934. See also \fI\-\-false\-start\fP.
  3935. .IP "\-\-tcp\-nodelay"
  3936. Turn on the TCP_NODELAY option. See the \fIcurl_easy_setopt(3)\fP man page for
  3937. details about this option.
  3938. curl sets this option by default and you need to explicitly switch it off if
  3939. you do not want it on.
  3940. Providing --tcp-nodelay multiple times has no extra effect.
  3941. Disable it again with \-\-no-tcp-nodelay.
  3942. Example:
  3943. .nf
  3944. curl --tcp-nodelay https://example.com
  3945. .fi
  3946. See also \fI-N, \-\-no\-buffer\fP.
  3947. .IP "\-t, \-\-telnet\-option <opt=val>"
  3948. Pass options to the telnet protocol. Supported options are:
  3949. .RS
  3950. .IP TTYPE=<term>
  3951. Sets the terminal type.
  3952. .IP "XDISPLOC=<X display>"
  3953. Sets the X display location.
  3954. .IP NEW_ENV=<var,val>
  3955. Sets an environment variable.
  3956. .RE
  3957. .IP
  3958. --telnet-option can be used several times in a command line
  3959. Example:
  3960. .nf
  3961. curl -t TTYPE=vt100 telnet://example.com/
  3962. .fi
  3963. See also \fI-K, \-\-config\fP.
  3964. .IP "\-\-tftp\-blksize <value>"
  3965. (TFTP) Set the TFTP \fBBLKSIZE\fP option (must be 512 or larger). This is the block
  3966. size that curl tries to use when transferring data to or from a TFTP
  3967. server. By default 512 bytes are used.
  3968. If --tftp-blksize is provided several times, the last set value is used.
  3969. Example:
  3970. .nf
  3971. curl --tftp-blksize 1024 tftp://example.com/file
  3972. .fi
  3973. See also \fI\-\-tftp\-no\-options\fP.
  3974. .IP "\-\-tftp\-no\-options"
  3975. (TFTP) Do not to send TFTP options requests. This improves interop with some legacy
  3976. servers that do not acknowledge or properly implement TFTP options. When this
  3977. option is used \fI\-\-tftp\-blksize\fP is ignored.
  3978. Providing --tftp-no-options multiple times has no extra effect.
  3979. Disable it again with \-\-no-tftp-no-options.
  3980. Example:
  3981. .nf
  3982. curl --tftp-no-options tftp://192.168.0.1/
  3983. .fi
  3984. See also \fI\-\-tftp\-blksize\fP.
  3985. .IP "\-z, \-\-time\-cond <time>"
  3986. (HTTP FTP) Request a file that has been modified later than the given time and date, or
  3987. one that has been modified before that time. The date expression can be all
  3988. sorts of date strings or if it does not match any internal ones, it is treated
  3989. as a filename and curl tries to get the modification date (mtime) from that
  3990. file instead. See the \fIcurl_getdate(3)\fP man pages for date expression details.
  3991. Start the date expression with a dash (\-) to make it request for a document
  3992. that is older than the given date/time, default is a document that is newer
  3993. than the specified date/time.
  3994. If provided a non\-existing file, curl outputs a warning about that fact and
  3995. proceeds to do the transfer without a time condition.
  3996. If --time-cond is provided several times, the last set value is used.
  3997. Examples:
  3998. .nf
  3999. curl -z "Wed 01 Sep 2021 12:18:00" https://example.com
  4000. curl -z "-Wed 01 Sep 2021 12:18:00" https://example.com
  4001. curl -z file https://example.com
  4002. .fi
  4003. See also \fI\-\-etag\-compare\fP and \fI-R, \-\-remote\-time\fP.
  4004. .IP "\-\-tls\-max <VERSION>"
  4005. (TLS) VERSION defines maximum supported TLS version. The minimum acceptable version
  4006. is set by tlsv1.0, tlsv1.1, tlsv1.2 or tlsv1.3.
  4007. If the connection is done without TLS, this option has no effect. This
  4008. includes QUIC\-using (HTTP/3) transfers.
  4009. .RS
  4010. .IP default
  4011. Use up to recommended TLS version.
  4012. .IP 1.0
  4013. Use up to TLSv1.0.
  4014. .IP 1.1
  4015. Use up to TLSv1.1.
  4016. .IP 1.2
  4017. Use up to TLSv1.2.
  4018. .IP 1.3
  4019. Use up to TLSv1.3.
  4020. .RE
  4021. .IP
  4022. If --tls-max is provided several times, the last set value is used.
  4023. Examples:
  4024. .nf
  4025. curl --tls-max 1.2 https://example.com
  4026. curl --tls-max 1.3 --tlsv1.2 https://example.com
  4027. .fi
  4028. \fI\-\-tls\-max\fP requires that libcurl is built to support TLS.
  4029. See also \fI\-\-tlsv1.0\fP, \fI\-\-tlsv1.1\fP, \fI\-\-tlsv1.2\fP and \fI\-\-tlsv1.3\fP.
  4030. .IP "\-\-tls13\-ciphers <list>"
  4031. (TLS) Specifies which cipher suites to use in the connection if it negotiates TLS
  4032. 1.3. The list of ciphers suites must specify valid ciphers. Read up on TLS 1.3
  4033. cipher suite details on this URL:
  4034. https://curl.se/docs/ssl\-ciphers.html
  4035. This option is currently used only when curl is built to use OpenSSL 1.1.1 or
  4036. later, or Schannel. If you are using a different SSL backend you can try
  4037. setting TLS 1.3 cipher suites by using the \fI\-\-ciphers\fP option.
  4038. If --tls13-ciphers is provided several times, the last set value is used.
  4039. Example:
  4040. .nf
  4041. curl --tls13-ciphers TLS_AES_128_GCM_SHA256 https://example.com
  4042. .fi
  4043. Added in 7.61.0. See also \fI\-\-ciphers\fP, \fI\-\-curves\fP and \fI\-\-proxy\-tls13\-ciphers\fP.
  4044. .IP "\-\-tlsauthtype <type>"
  4045. (TLS) Set TLS authentication type. Currently, the only supported option is "SRP",
  4046. for TLS\-SRP (RFC 5054). If \fI\-\-tlsuser\fP and \fI\-\-tlspassword\fP are specified but
  4047. \fI\-\-tlsauthtype\fP is not, then this option defaults to "SRP". This option works
  4048. only if the underlying libcurl is built with TLS\-SRP support, which requires
  4049. OpenSSL or GnuTLS with TLS\-SRP support.
  4050. If --tlsauthtype is provided several times, the last set value is used.
  4051. Example:
  4052. .nf
  4053. curl --tlsauthtype SRP https://example.com
  4054. .fi
  4055. See also \fI\-\-tlsuser\fP.
  4056. .IP "\-\-tlspassword <string>"
  4057. (TLS) Set password to use with the TLS authentication method specified with
  4058. \fI\-\-tlsauthtype\fP. Requires that \fI\-\-tlsuser\fP is set.
  4059. This option does not work with TLS 1.3.
  4060. If --tlspassword is provided several times, the last set value is used.
  4061. Example:
  4062. .nf
  4063. curl --tlspassword pwd --tlsuser user https://example.com
  4064. .fi
  4065. See also \fI\-\-tlsuser\fP.
  4066. .IP "\-\-tlsuser <name>"
  4067. (TLS) Set username for use with the TLS authentication method specified with
  4068. \fI\-\-tlsauthtype\fP. Requires that \fI\-\-tlspassword\fP also is set.
  4069. This option does not work with TLS 1.3.
  4070. If --tlsuser is provided several times, the last set value is used.
  4071. Example:
  4072. .nf
  4073. curl --tlspassword pwd --tlsuser user https://example.com
  4074. .fi
  4075. See also \fI\-\-tlspassword\fP.
  4076. .IP "\-1, \-\-tlsv1"
  4077. (TLS) Use at least TLS version 1.x when negotiating with a remote TLS server. That
  4078. means TLS version 1.0 or higher
  4079. Providing --tlsv1 multiple times has no extra effect.
  4080. Example:
  4081. .nf
  4082. curl --tlsv1 https://example.com
  4083. .fi
  4084. \fI-1, \-\-tlsv1\fP requires that libcurl is built to support TLS.
  4085. This option is mutually exclusive with \fI\-\-tlsv1.1\fP, \fI\-\-tlsv1.2\fP and \fI\-\-tlsv1.3\fP.
  4086. See also \fI\-\-http1.1\fP and \fI\-\-http2\fP.
  4087. .IP "\-\-tlsv1.0"
  4088. (TLS) Forces curl to use TLS version 1.0 or later when connecting to a remote TLS server.
  4089. In old versions of curl this option was documented to allow _only_ TLS 1.0.
  4090. That behavior was inconsistent depending on the TLS library. Use \fI\-\-tls\-max\fP if
  4091. you want to set a maximum TLS version.
  4092. Providing --tlsv1.0 multiple times has no extra effect.
  4093. Example:
  4094. .nf
  4095. curl --tlsv1.0 https://example.com
  4096. .fi
  4097. See also \fI\-\-tlsv1.3\fP.
  4098. .IP "\-\-tlsv1.1"
  4099. (TLS) Forces curl to use TLS version 1.1 or later when connecting to a remote TLS server.
  4100. In old versions of curl this option was documented to allow _only_ TLS 1.1.
  4101. That behavior was inconsistent depending on the TLS library. Use \fI\-\-tls\-max\fP if
  4102. you want to set a maximum TLS version.
  4103. Providing --tlsv1.1 multiple times has no extra effect.
  4104. Example:
  4105. .nf
  4106. curl --tlsv1.1 https://example.com
  4107. .fi
  4108. See also \fI\-\-tlsv1.3\fP and \fI\-\-tls\-max\fP.
  4109. .IP "\-\-tlsv1.2"
  4110. (TLS) Forces curl to use TLS version 1.2 or later when connecting to a remote TLS server.
  4111. In old versions of curl this option was documented to allow _only_ TLS 1.2.
  4112. That behavior was inconsistent depending on the TLS library. Use \fI\-\-tls\-max\fP if
  4113. you want to set a maximum TLS version.
  4114. Providing --tlsv1.2 multiple times has no extra effect.
  4115. Example:
  4116. .nf
  4117. curl --tlsv1.2 https://example.com
  4118. .fi
  4119. See also \fI\-\-tlsv1.3\fP and \fI\-\-tls\-max\fP.
  4120. .IP "\-\-tlsv1.3"
  4121. (TLS) Forces curl to use TLS version 1.3 or later when connecting to a remote TLS
  4122. server.
  4123. If the connection is done without TLS, this option has no effect. This
  4124. includes QUIC\-using (HTTP/3) transfers.
  4125. Note that TLS 1.3 is not supported by all TLS backends.
  4126. Providing --tlsv1.3 multiple times has no extra effect.
  4127. Example:
  4128. .nf
  4129. curl --tlsv1.3 https://example.com
  4130. .fi
  4131. See also \fI\-\-tlsv1.2\fP and \fI\-\-tls\-max\fP.
  4132. .IP "\-\-tr\-encoding"
  4133. (HTTP) Request a compressed Transfer\-Encoding response using one of the algorithms
  4134. curl supports, and uncompress the data while receiving it.
  4135. Providing --tr-encoding multiple times has no extra effect.
  4136. Disable it again with \-\-no-tr-encoding.
  4137. Example:
  4138. .nf
  4139. curl --tr-encoding https://example.com
  4140. .fi
  4141. See also \fI\-\-compressed\fP.
  4142. .IP "\-\-trace <file>"
  4143. Save a full trace dump of all incoming and outgoing data, including
  4144. descriptive information, in the given output file. Use "\-" as filename to have
  4145. the output sent to stdout. Use "%" as filename to have the output sent to
  4146. stderr.
  4147. Note that verbose output of curl activities and network traffic might contain
  4148. sensitive data, including usernames, credentials or secret data content. Be
  4149. aware and be careful when sharing trace logs with others.
  4150. This option is global and does not need to be specified for each use of --next.
  4151. If --trace is provided several times, the last set value is used.
  4152. Example:
  4153. .nf
  4154. curl --trace log.txt https://example.com
  4155. .fi
  4156. This option is mutually exclusive with \fI-v, \-\-verbose\fP and \fI\-\-trace\-ascii\fP.
  4157. See also \fI\-\-trace\-ascii\fP, \fI\-\-trace\-config\fP, \fI\-\-trace\-ids\fP and \fI\-\-trace\-time\fP.
  4158. .IP "\-\-trace\-ascii <file>"
  4159. Save a full trace dump of all incoming and outgoing data, including
  4160. descriptive information, in the given output file. Use "\-" as filename to have
  4161. the output sent to stdout. Use "%" as filename to send the output to stderr.
  4162. This is similar to \fI\-\-trace\fP, but leaves out the hex part and only shows the
  4163. ASCII part of the dump. It makes smaller output that might be easier to read
  4164. for untrained humans.
  4165. Note that verbose output of curl activities and network traffic might contain
  4166. sensitive data, including usernames, credentials or secret data content. Be
  4167. aware and be careful when sharing trace logs with others.
  4168. This option is global and does not need to be specified for each use of --next.
  4169. If --trace-ascii is provided several times, the last set value is used.
  4170. Example:
  4171. .nf
  4172. curl --trace-ascii log.txt https://example.com
  4173. .fi
  4174. This option is mutually exclusive with \fI\-\-trace\fP and \fI-v, \-\-verbose\fP.
  4175. See also \fI-v, \-\-verbose\fP and \fI\-\-trace\fP.
  4176. .IP "\-\-trace\-config <string>"
  4177. Set configuration for trace output. A comma\-separated list of components where
  4178. detailed output can be made available from. Names are case\-insensitive.
  4179. Specify \(aqall\(aq to enable all trace components.
  4180. In addition to trace component names, specify "ids" and "time" to avoid extra
  4181. \fI\-\-trace\-ids\fP or \fI\-\-trace\-time\fP parameters.
  4182. See the \fIcurl_global_trace(3)\fP man page for more details.
  4183. This option is global and does not need to be specified for each use of --next.
  4184. --trace-config can be used several times in a command line
  4185. Example:
  4186. .nf
  4187. curl --trace-config ids,http/2 https://example.com
  4188. .fi
  4189. Added in 8.3.0. See also \fI-v, \-\-verbose\fP and \fI\-\-trace\fP.
  4190. .IP "\-\-trace\-ids"
  4191. Prepends the transfer and connection identifiers to each trace or verbose line that curl displays.
  4192. This option is global and does not need to be specified for each use of --next.
  4193. Providing --trace-ids multiple times has no extra effect.
  4194. Disable it again with \-\-no-trace-ids.
  4195. Example:
  4196. .nf
  4197. curl --trace-ids --trace-ascii output https://example.com
  4198. .fi
  4199. Added in 8.2.0. See also \fI\-\-trace\fP and \fI-v, \-\-verbose\fP.
  4200. .IP "\-\-trace\-time"
  4201. Prepends a time stamp to each trace or verbose line that curl displays.
  4202. This option is global and does not need to be specified for each use of --next.
  4203. Providing --trace-time multiple times has no extra effect.
  4204. Disable it again with \-\-no-trace-time.
  4205. Example:
  4206. .nf
  4207. curl --trace-time --trace-ascii output https://example.com
  4208. .fi
  4209. See also \fI\-\-trace\fP and \fI-v, \-\-verbose\fP.
  4210. .IP "\-\-unix\-socket <path>"
  4211. (HTTP) Connect through this Unix domain socket, instead of using the network.
  4212. If --unix-socket is provided several times, the last set value is used.
  4213. Example:
  4214. .nf
  4215. curl --unix-socket socket-path https://example.com
  4216. .fi
  4217. See also \fI\-\-abstract\-unix\-socket\fP.
  4218. .IP "\-T, \-\-upload\-file <file>"
  4219. Upload the specified local file to the remote URL.
  4220. If there is no file part in the specified URL, curl appends the local file
  4221. name to the end of the URL before the operation starts. You must use a
  4222. trailing slash (/) on the last directory to prove to curl that there is no
  4223. filename or curl thinks that your last directory name is the remote filename
  4224. to use.
  4225. When putting the local filename at the end of the URL, curl ignores what is on
  4226. the left side of any slash (/) or backslash (\\) used in the filename and only
  4227. appends what is on the right side of the rightmost such character.
  4228. Use the filename "\-" (a single dash) to use stdin instead of a given file.
  4229. Alternately, the filename "." (a single period) may be specified instead of
  4230. \&"\-" to use stdin in non\-blocking mode to allow reading server output while
  4231. stdin is being uploaded.
  4232. If this option is used with an HTTP(S) URL, the PUT method is used.
  4233. You can specify one \fI\-T, \-\-upload\-file\fP for each URL on the command line. Each
  4234. \fI\-T, \-\-upload\-file\fP + URL pair specifies what to upload and to where. curl also
  4235. supports globbing of the \fI\-T, \-\-upload\-file\fP argument, meaning that you can upload
  4236. multiple files to a single URL by using the same URL globbing style supported
  4237. in the URL.
  4238. When uploading to an SMTP server: the uploaded data is assumed to be RFC 5322
  4239. formatted. It has to feature the necessary set of headers and mail body
  4240. formatted correctly by the user as curl does not transcode nor encode it
  4241. further in any way.
  4242. --upload-file is associated with a single URL. Use it once per URL when you use several URLs in a command line.
  4243. Examples:
  4244. .nf
  4245. curl -T file https://example.com
  4246. curl -T "img[1-1000].png" ftp://ftp.example.com/
  4247. curl --upload-file "{file1,file2}" https://example.com
  4248. curl -T file -T file2 https://example.com https://example.com
  4249. .fi
  4250. See also \fI-G, \-\-get\fP, \fI-I, \-\-head\fP, \fI-X, \-\-request\fP and \fI-d, \-\-data\fP.
  4251. .IP "\-\-url <url>"
  4252. Specify a URL to fetch.
  4253. If the given URL is missing a scheme name (such as "http://" or "ftp://" etc)
  4254. then curl makes a guess based on the host. If the outermost subdomain name
  4255. matches DICT, FTP, IMAP, LDAP, POP3 or SMTP then that protocol is used,
  4256. otherwise HTTP is used. Guessing can be avoided by providing a full URL
  4257. including the scheme, or disabled by setting a default protocol, see
  4258. \fI\-\-proto\-default\fP for details.
  4259. To control where this URL is written, use the \fI\-o, \-\-output\fP or the \fI\-O, \-\-remote\-name\fP
  4260. options.
  4261. \fBWARNING\fP: On Windows, particular "file://" accesses can be converted to
  4262. network accesses by the operating system. Beware!
  4263. --url can be used several times in a command line
  4264. Example:
  4265. .nf
  4266. curl --url https://example.com
  4267. .fi
  4268. See also \fI-:, \-\-next\fP and \fI-K, \-\-config\fP.
  4269. .IP "\-\-url\-query <data>"
  4270. (all) Add a piece of data, usually a name + value pair, to the end of the URL query
  4271. part. The syntax is identical to that used for \fI\-\-data\-urlencode\fP with one
  4272. extension:
  4273. If the argument starts with a \(aq+\(aq (plus), the rest of the string is provided
  4274. as\-is unencoded.
  4275. The query part of a URL is the one following the question mark on the right
  4276. end.
  4277. --url-query can be used several times in a command line
  4278. Examples:
  4279. .nf
  4280. curl --url-query name=val https://example.com
  4281. curl --url-query =encodethis http://example.net/foo
  4282. curl --url-query name@file https://example.com
  4283. curl --url-query @fileonly https://example.com
  4284. curl --url-query "+name=%20foo" https://example.com
  4285. .fi
  4286. Added in 7.87.0. See also \fI\-\-data\-urlencode\fP and \fI-G, \-\-get\fP.
  4287. .IP "\-B, \-\-use\-ascii"
  4288. (FTP LDAP) Enable ASCII transfer mode. For FTP, this can also be enforced by using a URL
  4289. that ends with ";type=A". This option causes data sent to stdout to be in text
  4290. mode for win32 systems.
  4291. Providing --use-ascii multiple times has no extra effect.
  4292. Disable it again with \-\-no-use-ascii.
  4293. Example:
  4294. .nf
  4295. curl -B ftp://example.com/README
  4296. .fi
  4297. See also \fI\-\-crlf\fP and \fI\-\-data\-ascii\fP.
  4298. .IP "\-u, \-\-user <user:password>"
  4299. Specify the username and password to use for server authentication. Overrides
  4300. \fI\-n, \-\-netrc\fP and \fI\-\-netrc\-optional\fP.
  4301. If you simply specify the username, curl prompts for a password.
  4302. The username and passwords are split up on the first colon, which makes it
  4303. impossible to use a colon in the username with this option. The password can,
  4304. still.
  4305. On systems where it works, curl hides the given option argument from process
  4306. listings. This is not enough to protect credentials from possibly getting seen
  4307. by other users on the same system as they still are visible for a moment
  4308. before cleared. Such sensitive data should be retrieved from a file instead or
  4309. similar and never used in clear text in a command line.
  4310. When using Kerberos V5 with a Windows based server you should include the
  4311. Windows domain name in the username, in order for the server to successfully
  4312. obtain a Kerberos Ticket. If you do not, then the initial authentication
  4313. handshake may fail.
  4314. When using NTLM, the username can be specified simply as the username, without
  4315. the domain, if there is a single domain and forest in your setup for example.
  4316. To specify the domain name use either Down\-Level Logon Name or UPN (User
  4317. Principal Name) formats. For example, EXAMPLE\\user and user@example.com
  4318. respectively.
  4319. If you use a Windows SSPI\-enabled curl binary and perform Kerberos V5,
  4320. Negotiate, NTLM or Digest authentication then you can tell curl to select the
  4321. username and password from your environment by specifying a single colon with
  4322. this option: "\-u :".
  4323. If --user is provided several times, the last set value is used.
  4324. Example:
  4325. .nf
  4326. curl -u user:secret https://example.com
  4327. .fi
  4328. See also \fI-n, \-\-netrc\fP and \fI-K, \-\-config\fP.
  4329. .IP "\-A, \-\-user\-agent <name>"
  4330. (HTTP) Specify the User\-Agent string to send to the HTTP server. To encode blanks in
  4331. the string, surround the string with single quote marks. This header can also
  4332. be set with the \fI\-H, \-\-header\fP or the \fI\-\-proxy\-header\fP options.
  4333. If you give an empty argument to \fI\-A, \-\-user\-agent\fP (""), it removes the header
  4334. completely from the request. If you prefer a blank header, you can set it to a
  4335. single space (" ").
  4336. If --user-agent is provided several times, the last set value is used.
  4337. Example:
  4338. .nf
  4339. curl -A "Agent 007" https://example.com
  4340. .fi
  4341. See also \fI-H, \-\-header\fP and \fI\-\-proxy\-header\fP.
  4342. .IP "\-\-variable <[%]name=text/@file>"
  4343. Set a variable with "name=content" or "name@file" (where "file" can be stdin
  4344. if set to a single dash ("\-")). The name is a case sensitive identifier that
  4345. must consist of no other letters than a\-z, A\-Z, 0\-9 or underscore. The
  4346. specified content is then associated with this identifier.
  4347. Setting the same variable name again overwrites the old contents with the new.
  4348. The contents of a variable can be referenced in a later command line option
  4349. when that option name is prefixed with "\fI\-\-expand\-\fP", and the name is used as
  4350. \&"{{name}}".
  4351. \fI\-\-variable\fP can import environment variables into the name space. Opt to either
  4352. require the environment variable to be set or provide a default value for the
  4353. variable in case it is not already set.
  4354. \fI\-\-variable\fP %name imports the variable called "name" but exits with an error if
  4355. that environment variable is not already set. To provide a default value if
  4356. the environment variable is not set, use \fI\-\-variable\fP %name=content or
  4357. \fI\-\-variable\fP %name@content. Note that on some systems \- but not all \-
  4358. environment variables are case insensitive.
  4359. When expanding variables, curl supports a set of functions that can make the
  4360. variable contents more convenient to use. You apply a function to a variable
  4361. expansion by adding a colon and then list the desired functions in a
  4362. comma\-separated list that is evaluated in a left\-to\-right order. Variable
  4363. content holding null bytes that are not encoded when expanded, causes an
  4364. error.
  4365. Available functions:
  4366. .RS
  4367. .IP trim
  4368. removes all leading and trailing white space.
  4369. .IP json
  4370. outputs the content using JSON string quoting rules.
  4371. .IP url
  4372. shows the content URL (percent) encoded.
  4373. .IP b64
  4374. expands the variable base64 encoded
  4375. .RE
  4376. .IP
  4377. --variable can be used several times in a command line
  4378. Example:
  4379. .nf
  4380. curl --variable name=smith --expand-url "https://example.com/{{name}}"
  4381. .fi
  4382. Added in 8.3.0. See also \fI-K, \-\-config\fP.
  4383. .IP "\-v, \-\-verbose"
  4384. Makes curl verbose during the operation. Useful for debugging and seeing
  4385. what\(aqs going on under the hood. A line starting with > means header data sent
  4386. by curl, < means header data received by curl that is hidden in normal cases,
  4387. and a line starting with * means additional info provided by curl.
  4388. If you only want HTTP headers in the output, \fI\-i, \-\-include\fP or \fI\-D, \-\-dump\-header\fP might
  4389. be more suitable options.
  4390. If you think this option still does not give you enough details, consider using
  4391. \fI\-\-trace\fP or \fI\-\-trace\-ascii\fP instead.
  4392. Note that verbose output of curl activities and network traffic might contain
  4393. sensitive data, including usernames, credentials or secret data content. Be
  4394. aware and be careful when sharing trace logs with others.
  4395. This option is global and does not need to be specified for each use of --next.
  4396. Providing --verbose multiple times has no extra effect.
  4397. Disable it again with \-\-no-verbose.
  4398. Example:
  4399. .nf
  4400. curl --verbose https://example.com
  4401. .fi
  4402. This option is mutually exclusive with \fI\-\-trace\fP and \fI\-\-trace\-ascii\fP.
  4403. See also \fI-i, \-\-include\fP, \fI-s, \-\-silent\fP, \fI\-\-trace\fP and \fI\-\-trace\-ascii\fP.
  4404. .IP "\-V, \-\-version"
  4405. Displays information about curl and the libcurl version it uses.
  4406. The first line includes the full version of curl, libcurl and other 3rd party
  4407. libraries linked with the executable.
  4408. The second line (starts with "Release\-Date:") shows the release date.
  4409. The third line (starts with "Protocols:") shows all protocols that libcurl
  4410. reports to support.
  4411. The fourth line (starts with "Features:") shows specific features libcurl
  4412. reports to offer. Available features include:
  4413. .RS
  4414. .IP alt-svc
  4415. Support for the Alt\-Svc: header is provided.
  4416. .IP AsynchDNS
  4417. This curl uses asynchronous name resolves. Asynchronous name resolves can be
  4418. done using either the c\-ares or the threaded resolver backends.
  4419. .IP brotli
  4420. Support for automatic brotli compression over HTTP(S).
  4421. .IP CharConv
  4422. curl was built with support for character set conversions (like EBCDIC)
  4423. .IP Debug
  4424. This curl uses a libcurl built with Debug. This enables more error\-tracking
  4425. and memory debugging etc. For curl\-developers only!
  4426. .IP ECH
  4427. ECH support is present.
  4428. .IP gsasl
  4429. The built\-in SASL authentication includes extensions to support SCRAM because
  4430. libcurl was built with libgsasl.
  4431. .IP GSS-API
  4432. GSS\-API is supported.
  4433. .IP HSTS
  4434. HSTS support is present.
  4435. .IP HTTP2
  4436. HTTP/2 support has been built\-in.
  4437. .IP HTTP3
  4438. HTTP/3 support has been built\-in.
  4439. .IP HTTPS-proxy
  4440. This curl is built to support HTTPS proxy.
  4441. .IP IDN
  4442. This curl supports IDN \- international domain names.
  4443. .IP IPv6
  4444. You can use IPv6 with this.
  4445. .IP Kerberos
  4446. Kerberos V5 authentication is supported.
  4447. .IP Largefile
  4448. This curl supports transfers of large files, files larger than 2GB.
  4449. .IP libz
  4450. Automatic decompression (via gzip, deflate) of compressed files over HTTP is
  4451. supported.
  4452. .IP MultiSSL
  4453. This curl supports multiple TLS backends.
  4454. .IP NTLM
  4455. NTLM authentication is supported.
  4456. .IP NTLM_WB
  4457. NTLM delegation to winbind helper is supported.
  4458. .IP PSL
  4459. PSL is short for Public Suffix List and means that this curl has been built
  4460. with knowledge about "public suffixes".
  4461. .IP SPNEGO
  4462. SPNEGO authentication is supported.
  4463. .IP SSL
  4464. SSL versions of various protocols are supported, such as HTTPS, FTPS, POP3S
  4465. and so on.
  4466. .IP SSPI
  4467. SSPI is supported.
  4468. .IP TLS-SRP
  4469. SRP (Secure Remote Password) authentication is supported for TLS.
  4470. .IP TrackMemory
  4471. Debug memory tracking is supported.
  4472. .IP Unicode
  4473. Unicode support on Windows.
  4474. .IP UnixSockets
  4475. Unix sockets support is provided.
  4476. .IP zstd
  4477. Automatic decompression (via zstd) of compressed files over HTTP is supported.
  4478. .RE
  4479. .IP
  4480. Example:
  4481. .nf
  4482. curl --version
  4483. .fi
  4484. See also \fI-h, \-\-help\fP and \fI-M, \-\-manual\fP.
  4485. .IP "\-\-vlan\-priority <priority>"
  4486. (All) Set VLAN priority as defined in IEEE 802.1Q.
  4487. This field is set on Ethernet level, and only works within a local network.
  4488. The valid range for <priority> is 0 to 7.
  4489. If --vlan-priority is provided several times, the last set value is used.
  4490. Example:
  4491. .nf
  4492. curl --vlan-priority 4 https://example.com
  4493. .fi
  4494. Added in 8.9.0. See also \fI\-\-ip\-tos\fP.
  4495. .IP "\-w, \-\-write\-out <format>"
  4496. Make curl display information on stdout after a completed transfer. The format
  4497. is a string that may contain plain text mixed with any number of variables.
  4498. The format can be specified as a literal "string", or you can have curl read
  4499. the format from a file with "@filename" and to tell curl to read the format
  4500. from stdin you write "@\-".
  4501. The variables present in the output format are substituted by the value or
  4502. text that curl thinks fit, as described below. All variables are specified as
  4503. %{variable_name} and to output a normal % you just write them as %%. You can
  4504. output a newline by using \\n, a carriage return with \\r and a tab space with
  4505. \\t.
  4506. The output is by default written to standard output, but can be changed with
  4507. %{stderr} and %output{}.
  4508. Output HTTP headers from the most recent request by using \fI%header{name}\fP
  4509. where \fIname\fP is the case insensitive name of the header (without the trailing
  4510. colon). The header contents are exactly as sent over the network, with leading
  4511. and trailing whitespace trimmed (added in 7.84.0).
  4512. Select a specific target destination file to write the output to, by using
  4513. \fI%output{name}\fP (added in curl 8.3.0) where \fIname\fP is the full filename. The
  4514. output following that instruction is then written to that file. More than one
  4515. \fI%output{}\fP instruction can be specified in the same write\-out argument. If
  4516. the filename cannot be created, curl leaves the output destination to the one
  4517. used prior to the \fI%output{}\fP instruction. Use \fI%output{>>name}\fP to append
  4518. data to an existing file.
  4519. This output is done independently of if the file transfer was successful or
  4520. not.
  4521. If the specified action or output specified with this option fails in any way,
  4522. it does not make curl return a (different) error.
  4523. \fBNOTE:\fP On Windows, the %\-symbol is a special symbol used to expand
  4524. environment variables. In batch files, all occurrences of % must be doubled
  4525. when using this option to properly escape. If this option is used at the
  4526. command prompt then the % cannot be escaped and unintended expansion is
  4527. possible.
  4528. The variables available are:
  4529. .RS
  4530. .IP certs
  4531. Output the certificate chain with details. Supported only by the OpenSSL,
  4532. GnuTLS, Schannel and Secure Transport backends. (Added in 7.88.0)
  4533. .IP conn_id
  4534. The connection identifier last used by the transfer. The connection id is
  4535. unique number among all connections using the same connection cache.
  4536. (Added in 8.2.0)
  4537. .IP content_type
  4538. The Content\-Type of the requested document, if there was any.
  4539. .IP errormsg
  4540. The error message. (Added in 7.75.0)
  4541. .IP exitcode
  4542. The numerical exit code of the transfer. (Added in 7.75.0)
  4543. .IP filename_effective
  4544. The ultimate filename that curl writes out to. This is only meaningful if curl
  4545. is told to write to a file with the \fI\-O, \-\-remote\-name\fP or \fI\-o, \-\-output\fP option. It is
  4546. most useful in combination with the \fI\-J, \-\-remote\-header\-name\fP option.
  4547. .IP ftp_entry_path
  4548. The initial path curl ended up in when logging on to the remote FTP
  4549. server.
  4550. .IP header_json
  4551. A JSON object with all HTTP response headers from the recent transfer. Values
  4552. are provided as arrays, since in the case of multiple headers there can be
  4553. multiple values. (Added in 7.83.0)
  4554. The header names provided in lowercase, listed in order of appearance over the
  4555. wire. Except for duplicated headers. They are grouped on the first occurrence
  4556. of that header, each value is presented in the JSON array.
  4557. .IP http_code
  4558. The numerical response code that was found in the last retrieved HTTP(S) or
  4559. FTP(s) transfer.
  4560. .IP http_connect
  4561. The numerical code that was found in the last response (from a proxy) to a
  4562. curl CONNECT request.
  4563. .IP http_version
  4564. The http version that was effectively used.
  4565. .IP json
  4566. A JSON object with all available keys. (Added in 7.70.0)
  4567. .IP local_ip
  4568. The IP address of the local end of the most recently done connection \- can be
  4569. either IPv4 or IPv6.
  4570. .IP local_port
  4571. The local port number of the most recently done connection.
  4572. .IP method
  4573. The http method used in the most recent HTTP request. (Added in 7.72.0)
  4574. .IP num_certs
  4575. Number of server certificates received in the TLS handshake. Supported only by
  4576. the OpenSSL, GnuTLS, Schannel and Secure Transport backends.
  4577. (Added in 7.88.0)
  4578. .IP num_connects
  4579. Number of new connects made in the recent transfer.
  4580. .IP num_headers
  4581. The number of response headers in the most recent request (restarted at each
  4582. redirect). Note that the status line IS NOT a header. (Added in 7.73.0)
  4583. .IP num_redirects
  4584. Number of redirects that were followed in the request.
  4585. .IP num_retries
  4586. Number of retries actually performed when "\fI\-\-retry\fP" has been used.
  4587. (Added in 8.9.0)
  4588. .IP onerror
  4589. The rest of the output is only shown if the transfer returned a non\-zero error.
  4590. (Added in 7.75.0)
  4591. .IP proxy_ssl_verify_result
  4592. The result of the HTTPS proxy\(aqs SSL peer certificate verification that was
  4593. requested. 0 means the verification was successful.
  4594. .IP proxy_used
  4595. Returns 1 if the previous transfer used a proxy, otherwise 0. Useful to for
  4596. example determine if a "NOPROXY" pattern matched the hostname or not. (Added
  4597. in 8.7.0)
  4598. .IP redirect_url
  4599. When an HTTP request was made without \fI\-L, \-\-location\fP to follow redirects (or when
  4600. \fI\-\-max\-redirs\fP is met), this variable shows the actual URL a redirect
  4601. \fIwould\fP have gone to.
  4602. .IP referer
  4603. The Referer: header, if there was any. (Added in 7.76.0)
  4604. .IP remote_ip
  4605. The remote IP address of the most recently done connection \- can be either
  4606. IPv4 or IPv6.
  4607. .IP remote_port
  4608. The remote port number of the most recently done connection.
  4609. .IP response_code
  4610. The numerical response code that was found in the last transfer (formerly
  4611. known as "http_code").
  4612. .IP scheme
  4613. The URL scheme (sometimes called protocol) that was effectively used.
  4614. .IP size_download
  4615. The total amount of bytes that were downloaded. This is the size of the
  4616. body/data that was transferred, excluding headers.
  4617. .IP size_header
  4618. The total amount of bytes of the downloaded headers.
  4619. .IP size_request
  4620. The total amount of bytes that were sent in the HTTP request.
  4621. .IP size_upload
  4622. The total amount of bytes that were uploaded. This is the size of the
  4623. body/data that was transferred, excluding headers.
  4624. .IP speed_download
  4625. The average download speed that curl measured for the complete download. Bytes
  4626. per second.
  4627. .IP speed_upload
  4628. The average upload speed that curl measured for the complete upload. Bytes per
  4629. second.
  4630. .IP ssl_verify_result
  4631. The result of the SSL peer certificate verification that was requested. 0
  4632. means the verification was successful.
  4633. .IP stderr
  4634. From this point on, the \fI\-w, \-\-write\-out\fP output is written to standard
  4635. error. (Added in 7.63.0)
  4636. .IP stdout
  4637. From this point on, the \fI\-w, \-\-write\-out\fP output is written to standard output.
  4638. This is the default, but can be used to switch back after switching to stderr.
  4639. (Added in 7.63.0)
  4640. .IP time_appconnect
  4641. The time, in seconds, it took from the start until the SSL/SSH/etc
  4642. connect/handshake to the remote host was completed.
  4643. .IP time_connect
  4644. The time, in seconds, it took from the start until the TCP connect to the
  4645. remote host (or proxy) was completed.
  4646. .IP time_namelookup
  4647. The time, in seconds, it took from the start until the name resolving was
  4648. completed.
  4649. .IP time_pretransfer
  4650. The time, in seconds, it took from the start until the file transfer was just
  4651. about to begin. This includes all pre\-transfer commands and negotiations that
  4652. are specific to the particular protocol(s) involved.
  4653. .IP time_redirect
  4654. The time, in seconds, it took for all redirection steps including name lookup,
  4655. connect, pretransfer and transfer before the final transaction was
  4656. started. "time_redirect" shows the complete execution time for multiple
  4657. redirections.
  4658. .IP time_starttransfer
  4659. The time, in seconds, it took from the start until the first byte is received.
  4660. This includes time_pretransfer and also the time the server needed to calculate
  4661. the result.
  4662. .IP time_total
  4663. The total time, in seconds, that the full operation lasted.
  4664. .IP url
  4665. The URL that was fetched. (Added in 7.75.0)
  4666. .IP url.scheme
  4667. The scheme part of the URL that was fetched. (Added in 8.1.0)
  4668. .IP url.user
  4669. The user part of the URL that was fetched. (Added in 8.1.0)
  4670. .IP url.password
  4671. The password part of the URL that was fetched. (Added in 8.1.0)
  4672. .IP url.options
  4673. The options part of the URL that was fetched. (Added in 8.1.0)
  4674. .IP url.host
  4675. The host part of the URL that was fetched. (Added in 8.1.0)
  4676. .IP url.port
  4677. The port number of the URL that was fetched. If no port number was specified
  4678. and the URL scheme is known, that scheme\(aqs default port number is
  4679. shown. (Added in 8.1.0)
  4680. .IP url.path
  4681. The path part of the URL that was fetched. (Added in 8.1.0)
  4682. .IP url.query
  4683. The query part of the URL that was fetched. (Added in 8.1.0)
  4684. .IP url.fragment
  4685. The fragment part of the URL that was fetched. (Added in 8.1.0)
  4686. .IP url.zoneid
  4687. The zone id part of the URL that was fetched. (Added in 8.1.0)
  4688. .IP urle.scheme
  4689. The scheme part of the effective (last) URL that was fetched. (Added in 8.1.0)
  4690. .IP urle.user
  4691. The user part of the effective (last) URL that was fetched. (Added in 8.1.0)
  4692. .IP urle.password
  4693. The password part of the effective (last) URL that was fetched. (Added in 8.1.0)
  4694. .IP urle.options
  4695. The options part of the effective (last) URL that was fetched. (Added in 8.1.0)
  4696. .IP urle.host
  4697. The host part of the effective (last) URL that was fetched. (Added in 8.1.0)
  4698. .IP urle.port
  4699. The port number of the effective (last) URL that was fetched. If no port
  4700. number was specified, but the URL scheme is known, that scheme\(aqs default port
  4701. number is shown. (Added in 8.1.0)
  4702. .IP urle.path
  4703. The path part of the effective (last) URL that was fetched. (Added in 8.1.0)
  4704. .IP urle.query
  4705. The query part of the effective (last) URL that was fetched. (Added in 8.1.0)
  4706. .IP urle.fragment
  4707. The fragment part of the effective (last) URL that was fetched. (Added in 8.1.0)
  4708. .IP urle.zoneid
  4709. The zone id part of the effective (last) URL that was fetched. (Added in 8.1.0)
  4710. .IP urlnum
  4711. The URL index number of this transfer, 0\-indexed. Unglobbed URLs share the
  4712. same index number as the origin globbed URL. (Added in 7.75.0)
  4713. .IP url_effective
  4714. The URL that was fetched last. This is most meaningful if you have told curl
  4715. to follow location: headers.
  4716. .IP xfer_id
  4717. The numerical identifier of the last transfer done. \-1 if no transfer has been
  4718. started yet for the handle. The transfer id is unique among all transfers
  4719. performed using the same connection cache.
  4720. (Added in 8.2.0)
  4721. .RE
  4722. .IP
  4723. If --write-out is provided several times, the last set value is used.
  4724. Example:
  4725. .nf
  4726. curl -w '%{response_code}\\n' https://example.com
  4727. .fi
  4728. See also \fI-v, \-\-verbose\fP and \fI-I, \-\-head\fP.
  4729. .IP "\-\-xattr"
  4730. When saving output to a file, tell curl to store file metadata in extended
  4731. file attributes. Currently, the URL is stored in the "xdg.origin.url"
  4732. attribute and, for HTTP, the content type is stored in the "mime_type"
  4733. attribute. If the file system does not support extended attributes, a warning
  4734. is issued.
  4735. Providing --xattr multiple times has no extra effect.
  4736. Disable it again with \-\-no-xattr.
  4737. Example:
  4738. .nf
  4739. curl --xattr -o storage https://example.com
  4740. .fi
  4741. See also \fI-R, \-\-remote\-time\fP, \fI-w, \-\-write\-out\fP and \fI-v, \-\-verbose\fP.
  4742. .SH FILES
  4743. \fI~/.curlrc\fP
  4744. Default config file, see \fI\-K, \-\-config\fP for details.
  4745. .SH ENVIRONMENT
  4746. The environment variables can be specified in lower case or upper case. The
  4747. lower case version has precedence. "http_proxy" is an exception as it is only
  4748. available in lower case.
  4749. Using an environment variable to set the proxy has the same effect as using
  4750. the \fI\-x, \-\-proxy\fP option.
  4751. .IP "http_proxy [protocol://]<host>[:port]"
  4752. Sets the proxy server to use for HTTP.
  4753. .IP "HTTPS_PROXY [protocol://]<host>[:port]"
  4754. Sets the proxy server to use for HTTPS.
  4755. .IP "[url-protocol]_PROXY [protocol://]<host>[:port]"
  4756. Sets the proxy server to use for [url\-protocol], where the protocol is a
  4757. protocol that curl supports and as specified in a URL. FTP, FTPS, POP3, IMAP,
  4758. SMTP, LDAP, etc.
  4759. .IP "ALL_PROXY [protocol://]<host>[:port]"
  4760. Sets the proxy server to use if no protocol\-specific proxy is set.
  4761. .IP "NO_PROXY <comma-separated list of hosts/domains>"
  4762. list of hostnames that should not go through any proxy. If set to an asterisk
  4763. \(aq*\(aq only, it matches all hosts. Each name in this list is matched as either a
  4764. domain name which contains the hostname, or the hostname itself.
  4765. This environment variable disables use of the proxy even when specified with
  4766. the \fI\-x, \-\-proxy\fP option. That is
  4767. .nf
  4768. NO_PROXY=direct.example.com curl \-x http://proxy.example.com
  4769. http://direct.example.com
  4770. .fi
  4771. accesses the target URL directly, and
  4772. .nf
  4773. NO_PROXY=direct.example.com curl \-x http://proxy.example.com
  4774. http://somewhere.example.com
  4775. .fi
  4776. accesses the target URL through the proxy.
  4777. The list of hostnames can also be include numerical IP addresses, and IPv6
  4778. versions should then be given without enclosing brackets.
  4779. IP addresses can be specified using CIDR notation: an appended slash and
  4780. number specifies the number of "network bits" out of the address to use in the
  4781. comparison (added in 7.86.0). For example "192.168.0.0/16" would match all
  4782. addresses starting with "192.168".
  4783. .IP "APPDATA <dir>"
  4784. On Windows, this variable is used when trying to find the home directory. If
  4785. the primary home variable are all unset.
  4786. .IP "COLUMNS <terminal width>"
  4787. If set, the specified number of characters is used as the terminal width when
  4788. the alternative progress\-bar is shown. If not set, curl tries to figure it out
  4789. using other ways.
  4790. .IP "CURL_CA_BUNDLE <file>"
  4791. If set, it is used as the \fI\-\-cacert\fP value. This environment variable is ignored
  4792. if Schannel is used as the TLS backend.
  4793. .IP "CURL_HOME <dir>"
  4794. If set, is the first variable curl checks when trying to find its home
  4795. directory. If not set, it continues to check \fIXDG_CONFIG_HOME\fP
  4796. .IP "CURL_SSL_BACKEND <TLS backend>"
  4797. If curl was built with support for "MultiSSL", meaning that it has built\-in
  4798. support for more than one TLS backend, this environment variable can be set to
  4799. the case insensitive name of the particular backend to use when curl is
  4800. invoked. Setting a name that is not a built\-in alternative makes curl stay
  4801. with the default.
  4802. SSL backend names (case\-insensitive): \fBbearssl\fP, \fBgnutls\fP, \fBmbedtls\fP,
  4803. \fBopenssl\fP, \fBrustls\fP, \fBschannel\fP, \fBsecure\-transport\fP, \fBwolfssl\fP
  4804. .IP "HOME <dir>"
  4805. If set, this is used to find the home directory when that is needed. Like when
  4806. looking for the default .curlrc. \fICURL_HOME\fP and \fIXDG_CONFIG_HOME\fP
  4807. have preference.
  4808. .IP "QLOGDIR <directory name>"
  4809. If curl was built with HTTP/3 support, setting this environment variable to a
  4810. local directory makes curl produce \fBqlogs\fP in that directory, using file
  4811. names named after the destination connection id (in hex). Do note that these
  4812. files can become rather large. Works with the ngtcp2 and quiche QUIC backends.
  4813. .IP SHELL
  4814. Used on VMS when trying to detect if using a \fBDCL\fP or a \fBunix\fP shell.
  4815. .IP "SSL_CERT_DIR <dir>"
  4816. If set, it is used as the \fI\-\-capath\fP value. This environment variable is ignored
  4817. if Schannel is used as the TLS backend.
  4818. .IP "SSL_CERT_FILE <path>"
  4819. If set, it is used as the \fI\-\-cacert\fP value. This environment variable is ignored
  4820. if Schannel is used as the TLS backend.
  4821. .IP "SSLKEYLOGFILE <filename>"
  4822. If you set this environment variable to a filename, curl stores TLS secrets
  4823. from its connections in that file when invoked to enable you to analyze the
  4824. TLS traffic in real time using network analyzing tools such as Wireshark. This
  4825. works with the following TLS backends: OpenSSL, LibreSSL (TLS 1.2 max),
  4826. BoringSSL, GnuTLS and wolfSSL.
  4827. .IP "USERPROFILE <dir>"
  4828. On Windows, this variable is used when trying to find the home directory. If
  4829. the other, primary, variable are all unset. If set, curl uses the path
  4830. \fB"$USERPROFILE\\Application Data"\fP.
  4831. .IP "XDG_CONFIG_HOME <dir>"
  4832. If \fICURL_HOME\fP is not set, this variable is checked when looking for a
  4833. default .curlrc file.
  4834. .SH PROXY PROTOCOL PREFIXES
  4835. The proxy string may be specified with a protocol:// prefix to specify
  4836. alternative proxy protocols.
  4837. If no protocol is specified in the proxy string or if the string does not
  4838. match a supported one, the proxy is treated as an HTTP proxy.
  4839. The supported proxy protocol prefixes are as follows:
  4840. .IP http://
  4841. Makes it use it as an HTTP proxy. The default if no scheme prefix is used.
  4842. .IP https://
  4843. Makes it treated as an \fBHTTPS\fP proxy.
  4844. .IP socks4://
  4845. Makes it the equivalent of \fI\-\-socks4\fP
  4846. .IP socks4a://
  4847. Makes it the equivalent of \fI\-\-socks4a\fP
  4848. .IP socks5://
  4849. Makes it the equivalent of \fI\-\-socks5\fP
  4850. .IP socks5h://
  4851. Makes it the equivalent of \fI\-\-socks5\-hostname\fP
  4852. .SH EXIT CODES
  4853. There are a bunch of different error codes and their corresponding error
  4854. messages that may appear under error conditions. At the time of this writing,
  4855. the exit codes are:
  4856. .IP 0
  4857. Success. The operation completed successfully according to the instructions.
  4858. .IP 1
  4859. Unsupported protocol. This build of curl has no support for this protocol.
  4860. .IP 2
  4861. Failed to initialize.
  4862. .IP 3
  4863. URL malformed. The syntax was not correct.
  4864. .IP 4
  4865. A feature or option that was needed to perform the desired request was not
  4866. enabled or was explicitly disabled at build\-time. To make curl able to do
  4867. this, you probably need another build of libcurl.
  4868. .IP 5
  4869. Could not resolve proxy. The given proxy host could not be resolved.
  4870. .IP 6
  4871. Could not resolve host. The given remote host could not be resolved.
  4872. .IP 7
  4873. Failed to connect to host.
  4874. .IP 8
  4875. Weird server reply. The server sent data curl could not parse.
  4876. .IP 9
  4877. FTP access denied. The server denied login or denied access to the particular
  4878. resource or directory you wanted to reach. Most often you tried to change to a
  4879. directory that does not exist on the server.
  4880. .IP 10
  4881. FTP accept failed. While waiting for the server to connect back when an active
  4882. FTP session is used, an error code was sent over the control connection or
  4883. similar.
  4884. .IP 11
  4885. FTP weird PASS reply. Curl could not parse the reply sent to the PASS request.
  4886. .IP 12
  4887. During an active FTP session while waiting for the server to connect back to
  4888. curl, the timeout expired.
  4889. .IP 13
  4890. FTP weird PASV reply, Curl could not parse the reply sent to the PASV request.
  4891. .IP 14
  4892. FTP weird 227 format. Curl could not parse the 227\-line the server sent.
  4893. .IP 15
  4894. FTP cannot use host. Could not resolve the host IP we got in the 227\-line.
  4895. .IP 16
  4896. HTTP/2 error. A problem was detected in the HTTP2 framing layer. This is
  4897. somewhat generic and can be one out of several problems, see the error message
  4898. for details.
  4899. .IP 17
  4900. FTP could not set binary. Could not change transfer method to binary.
  4901. .IP 18
  4902. Partial file. Only a part of the file was transferred.
  4903. .IP 19
  4904. FTP could not download/access the given file, the RETR (or similar) command
  4905. failed.
  4906. .IP 21
  4907. FTP quote error. A quote command returned error from the server.
  4908. .IP 22
  4909. HTTP page not retrieved. The requested URL was not found or returned another
  4910. error with the HTTP error code being 400 or above. This return code only
  4911. appears if \fI\-f, \-\-fail\fP is used.
  4912. .IP 23
  4913. Write error. Curl could not write data to a local filesystem or similar.
  4914. .IP 25
  4915. Failed starting the upload. For FTP, the server typically denied the STOR
  4916. command.
  4917. .IP 26
  4918. Read error. Various reading problems.
  4919. .IP 27
  4920. Out of memory. A memory allocation request failed.
  4921. .IP 28
  4922. Operation timeout. The specified time\-out period was reached according to the
  4923. conditions.
  4924. .IP 30
  4925. FTP PORT failed. The PORT command failed. Not all FTP servers support the PORT
  4926. command, try doing a transfer using PASV instead.
  4927. .IP 31
  4928. FTP could not use REST. The REST command failed. This command is used for
  4929. resumed FTP transfers.
  4930. .IP 33
  4931. HTTP range error. The range "command" did not work.
  4932. .IP 34
  4933. HTTP post error. Internal post\-request generation error.
  4934. .IP 35
  4935. SSL connect error. The SSL handshaking failed.
  4936. .IP 36
  4937. Bad download resume. Could not continue an earlier aborted download.
  4938. .IP 37
  4939. FILE could not read file. Failed to open the file. Permissions?
  4940. .IP 38
  4941. LDAP cannot bind. LDAP bind operation failed.
  4942. .IP 39
  4943. LDAP search failed.
  4944. .IP 41
  4945. Function not found. A required LDAP function was not found.
  4946. .IP 42
  4947. Aborted by callback. An application told curl to abort the operation.
  4948. .IP 43
  4949. Internal error. A function was called with a bad parameter.
  4950. .IP 45
  4951. Interface error. A specified outgoing interface could not be used.
  4952. .IP 47
  4953. Too many redirects. When following redirects, curl hit the maximum amount.
  4954. .IP 48
  4955. Unknown option specified to libcurl. This indicates that you passed a weird
  4956. option to curl that was passed on to libcurl and rejected. Read up in the
  4957. manual!
  4958. .IP 49
  4959. Malformed telnet option.
  4960. .IP 52
  4961. The server did not reply anything, which here is considered an error.
  4962. .IP 53
  4963. SSL crypto engine not found.
  4964. .IP 54
  4965. Cannot set SSL crypto engine as default.
  4966. .IP 55
  4967. Failed sending network data.
  4968. .IP 56
  4969. Failure in receiving network data.
  4970. .IP 58
  4971. Problem with the local certificate.
  4972. .IP 59
  4973. Could not use specified SSL cipher.
  4974. .IP 60
  4975. Peer certificate cannot be authenticated with known CA certificates.
  4976. .IP 61
  4977. Unrecognized transfer encoding.
  4978. .IP 63
  4979. Maximum file size exceeded.
  4980. .IP 64
  4981. Requested FTP SSL level failed.
  4982. .IP 65
  4983. Sending the data requires a rewind that failed.
  4984. .IP 66
  4985. Failed to initialize SSL Engine.
  4986. .IP 67
  4987. The username, password, or similar was not accepted and curl failed to log in.
  4988. .IP 68
  4989. File not found on TFTP server.
  4990. .IP 69
  4991. Permission problem on TFTP server.
  4992. .IP 70
  4993. Out of disk space on TFTP server.
  4994. .IP 71
  4995. Illegal TFTP operation.
  4996. .IP 72
  4997. Unknown TFTP transfer ID.
  4998. .IP 73
  4999. File already exists (TFTP).
  5000. .IP 74
  5001. No such user (TFTP).
  5002. .IP 77
  5003. Problem reading the SSL CA cert (path? access rights?).
  5004. .IP 78
  5005. The resource referenced in the URL does not exist.
  5006. .IP 79
  5007. An unspecified error occurred during the SSH session.
  5008. .IP 80
  5009. Failed to shut down the SSL connection.
  5010. .IP 82
  5011. Could not load CRL file, missing or wrong format.
  5012. .IP 83
  5013. Issuer check failed.
  5014. .IP 84
  5015. The FTP PRET command failed.
  5016. .IP 85
  5017. Mismatch of RTSP CSeq numbers.
  5018. .IP 86
  5019. Mismatch of RTSP Session Identifiers.
  5020. .IP 87
  5021. Unable to parse FTP file list.
  5022. .IP 88
  5023. FTP chunk callback reported error.
  5024. .IP 89
  5025. No connection available, the session is queued.
  5026. .IP 90
  5027. SSL public key does not matched pinned public key.
  5028. .IP 91
  5029. Invalid SSL certificate status.
  5030. .IP 92
  5031. Stream error in HTTP/2 framing layer.
  5032. .IP 93
  5033. An API function was called from inside a callback.
  5034. .IP 94
  5035. An authentication function returned an error.
  5036. .IP 95
  5037. A problem was detected in the HTTP/3 layer. This is somewhat generic and can
  5038. be one out of several problems, see the error message for details.
  5039. .IP 96
  5040. QUIC connection error. This error may be caused by an SSL library error. QUIC
  5041. is the protocol used for HTTP/3 transfers.
  5042. .IP 97
  5043. Proxy handshake error.
  5044. .IP 98
  5045. A client\-side certificate is required to complete the TLS handshake.
  5046. .IP 99
  5047. Poll or select returned fatal error.
  5048. .IP 100
  5049. A value or data field grew larger than allowed.
  5050. .IP XX
  5051. More error codes might appear here in future releases. The existing ones are
  5052. meant to never change.
  5053. .SH BUGS
  5054. If you experience any problems with curl, submit an issue in the project\(aqs bug
  5055. tracker on GitHub: https://github.com/curl/curl/issues
  5056. .SH AUTHORS
  5057. Daniel Stenberg is the main author, but the whole list of contributors is
  5058. found in the separate THANKS file.
  5059. .SH WWW
  5060. https://curl.se
  5061. .SH SEE ALSO
  5062. \fBftp (1)\fP, \fBwget (1)\fP