[{"data":1,"prerenderedAt":2516,"buildId":2517},["ShallowReactive",2],{"page:\u002Fextensions\u002Fkubb-labs\u002Fplugin-axios\u002Fguides\u002Fconfigure-requests":3},{"id":4,"frontmatter":5,"title":6,"heading":6,"body":7,"path":2515,"source":4},"extensions\u002Fkubb-labs\u002Fplugin-axios\u002Fguides\u002Fconfigure-requests.md",{},"Configure requests",{"type":8,"value":9,"toc":2495},"minimark",[10,14,19,31,116,157,388,392,395,468,483,495,499,514,602,608,749,760,771,775,781,860,1207,1251,1264,1393,1404,1409,1427,1519,1526,1533,1537,1543,1640,1650,1798,1985,1999,2037,2047,2051,2054,2081,2097,2100,2110,2224,2227,2240,2249,2288,2291,2301,2461,2464,2467,2477],[11,12,13],"p",{},"Set the base URL, credentials, shared headers, and interceptors on the generated Axios client, for every call or for one.",[15,16,18],"h2",{"id":17},"where-settings-apply","Where settings apply",[11,20,21,22,26,27,30],{},"Every generated function sends through the shared ",[23,24,25],"code",{},"client"," from ",[23,28,29],{},".kubb\u002Fclient.ts",", unless a call passes its own:",[32,33,34,50],"table",{},[35,36,37],"thead",{},[38,39,40,44,47],"tr",{},[41,42,43],"th",{},"Scope",[41,45,46],{},"How",[41,48,49],{},"Effect",[51,52,53,79,92,105],"tbody",{},[38,54,55,59,64],{},[56,57,58],"td",{},"Every call",[56,60,61],{},[23,62,63],{},"client.setConfig({ ... })",[56,65,66,67,70,71,74,75,78],{},"Merges into the shared config. ",[23,68,69],{},"headers",", ",[23,72,73],{},"mediaTypes",", and ",[23,76,77],{},"serializer"," merge per key.",[38,80,81,84,89],{},[56,82,83],{},"A separate client",[56,85,86],{},[23,87,88],{},"createClient({ ... })",[56,90,91],{},"Copies the shared config at creation, without its interceptors.",[38,93,94,97,102],{},[56,95,96],{},"A child client",[56,98,99],{},[23,100,101],{},"client.extend({ ... })",[56,103,104],{},"Copies the shared config and runs the parent's interceptors first.",[38,106,107,110,113],{},[56,108,109],{},"One call",[56,111,112],{},"The same key on the call",[56,114,115],{},"Wins over the client for that call.",[11,117,118,119,70,122,70,124,70,127,70,130,70,133,70,136,70,138,70,140,70,143,74,146,149,150,152,153,156],{},"The client takes ",[23,120,121],{},"baseURL",[23,123,69],{},[23,125,126],{},"auth",[23,128,129],{},"credentials",[23,131,132],{},"options",[23,134,135],{},"transport",[23,137,77],{},[23,139,73],{},[23,141,142],{},"validate",[23,144,145],{},"onValidationError",[23,147,148],{},"retry",". ",[23,151,69],{}," is a record, an array of pairs, or a ",[23,154,155],{},"Headers"," instance:",[158,159,163],"pre",{"language":160,"code":161,"class":162},"typescript","import { client, createClient } from '.\u002Fgen\u002F.kubb\u002Fclient'\nimport { getPetById } from '.\u002Fgen\u002Fclients\u002FgetPetById'\n\nclient.setConfig({ baseURL: import.meta.env.VITE_API_URL, headers: { 'X-Client': 'web' } })\n\nconst tenant = createClient({ baseURL: 'https:\u002F\u002Ftenant.example.com', auth: () => tenantToken })\nawait getPetById({ path: { petId: 1 }, client: tenant })\n\nawait getPetById({ path: { petId: 1 }, baseURL: 'http:\u002F\u002Flocalhost:3000' })","highlights",[23,164,166,197,198,197,214,197,216,197,272,197,274,197,315,197,353,197,355],{"class":165},"language-typescript",[167,168,171,175,179,182,184,187,190,193],"span",{"class":169,"style":170},"line","display: inline",[167,172,174],{"style":173},"color:#d73a49;--hls-dark:#f97583","import ",[167,176,178],{"style":177},"color:#005cc5;--hls-dark:#79b8ff","{ ",[167,180,25],{"style":181},"color:#24292e;--hls-dark:#e1e4e8",[167,183,70],{"style":173},[167,185,186],{"style":181},"createClient ",[167,188,189],{"style":177},"} ",[167,191,192],{"style":173},"from ",[167,194,196],{"style":195},"color:#032f62;--hls-dark:#9ecbff","'.\u002Fgen\u002F.kubb\u002Fclient'","\n",[167,199,200,202,204,207,209,211],{"class":169,"style":170},[167,201,174],{"style":173},[167,203,178],{"style":177},[167,205,206],{"style":181},"getPetById ",[167,208,189],{"style":177},[167,210,192],{"style":173},[167,212,213],{"style":195},"'.\u002Fgen\u002Fclients\u002FgetPetById'",[167,215],{"class":169,"style":170},[167,217,218,220,223,227,230,232,235,238,240,243,245,248,250,253,255,257,259,261,264,266,269],{"class":169,"style":170},[167,219,25],{"style":181},[167,221,222],{"style":173},".",[167,224,226],{"style":225},"color:#6f42c1;--hls-dark:#b392f0","setConfig",[167,228,229],{"style":177},"({ ",[167,231,121],{"style":177},[167,233,234],{"style":173},": ",[167,236,237],{"style":173},"import",[167,239,222],{"style":173},[167,241,242],{"style":177},"meta",[167,244,222],{"style":173},[167,246,247],{"style":177},"env",[167,249,222],{"style":173},[167,251,252],{"style":177},"VITE_API_URL",[167,254,70],{"style":173},[167,256,69],{"style":177},[167,258,234],{"style":173},[167,260,178],{"style":177},[167,262,263],{"style":195},"'X-Client'",[167,265,234],{"style":173},[167,267,268],{"style":195},"'web' ",[167,270,271],{"style":177},"} })",[167,273],{"class":169,"style":170},[167,275,276,279,282,285,288,290,292,294,297,299,301,303,306,309,312],{"class":169,"style":170},[167,277,278],{"style":173},"const ",[167,280,281],{"style":181},"tenant ",[167,283,284],{"style":173},"= ",[167,286,287],{"style":225},"createClient",[167,289,229],{"style":177},[167,291,121],{"style":177},[167,293,234],{"style":173},[167,295,296],{"style":195},"'https:\u002F\u002Ftenant.example.com'",[167,298,70],{"style":173},[167,300,126],{"style":177},[167,302,234],{"style":173},[167,304,305],{"style":177},"() ",[167,307,308],{"style":173},"=> ",[167,310,311],{"style":181},"tenantToken ",[167,313,314],{"style":177},"})",[167,316,317,320,323,325,328,330,332,335,337,340,343,345,347,349,351],{"class":169,"style":170},[167,318,319],{"style":173},"await ",[167,321,322],{"style":225},"getPetById",[167,324,229],{"style":177},[167,326,327],{"style":177},"path",[167,329,234],{"style":173},[167,331,178],{"style":177},[167,333,334],{"style":177},"petId",[167,336,234],{"style":173},[167,338,339],{"style":177},"1 ",[167,341,342],{"style":177},"}",[167,344,70],{"style":173},[167,346,25],{"style":177},[167,348,234],{"style":173},[167,350,281],{"style":181},[167,352,314],{"style":177},[167,354],{"class":169,"style":170},[167,356,357,359,361,363,365,367,369,371,373,375,377,379,381,383,386],{"class":169,"style":170},[167,358,319],{"style":173},[167,360,322],{"style":225},[167,362,229],{"style":177},[167,364,327],{"style":177},[167,366,234],{"style":173},[167,368,178],{"style":177},[167,370,334],{"style":177},[167,372,234],{"style":173},[167,374,339],{"style":177},[167,376,342],{"style":177},[167,378,70],{"style":173},[167,380,121],{"style":177},[167,382,234],{"style":173},[167,384,385],{"style":195},"'http:\u002F\u002Flocalhost:3000' ",[167,387,314],{"style":177},[15,389,391],{"id":390},"set-the-base-url","Set the base URL",[11,393,394],{},"A call uses the first base URL it finds:",[32,396,397,407],{},[35,398,399],{},[38,400,401,404],{},[41,402,403],{},"Order",[41,405,406],{},"Source",[51,408,409,419,433,443,453],{},[38,410,411,414],{},[56,412,413],{},"1",[56,415,416,418],{},[23,417,121],{}," on the call.",[38,420,421,424],{},[56,422,423],{},"2",[56,425,426,427,430,431,222],{},"The operation's own ",[23,428,429],{},"servers",", then its path's ",[23,432,429],{},[38,434,435,438],{},[56,436,437],{},"3",[56,439,440,441,222],{},"The client passed as ",[23,442,25],{},[38,444,445,448],{},[56,446,447],{},"4",[56,449,450,222],{},[23,451,452],{},"client.setConfig({ baseURL })",[38,454,455,458],{},[56,456,457],{},"5",[56,459,460,461,467],{},"The plugin's ",[462,463,465],"a",{"href":464},"https:\u002F\u002Fkubb.dev\u002Fextensions\u002Fkubb-labs\u002Fplugin-axios\u002Foptions#baseurl",[23,466,121],{}," option.",[469,470,472,473,475,476,479,480,222],"blockquote",{"as":471},"note","The spec's top-level ",[23,474,429],{}," URL is never used, even with the ",[23,477,478],{},"server"," option of ",[23,481,482],{},"adapterOas",[11,484,485,486,490,491,222],{},"See ",[462,487,489],{"href":488},"#which-server-a-call-picks","Which server a call picks"," and ",[462,492,494],{"href":493},"#named-servers","Named servers",[15,496,498],{"id":497},"authenticate-requests","Authenticate requests",[11,500,501,502,504,505,509,510,513],{},"Set ",[23,503,126],{}," to a token, or to a sync or async function that gets each ",[462,506,508],{"href":507},"https:\u002F\u002Fspec.openapis.org\u002Foas\u002Fv3.1.0#security-scheme-object","security scheme"," of the call. It returns the token, or ",[23,511,512],{},"undefined"," to skip the scheme:",[158,515,517],{"language":160,"code":516,"class":162},"client.setConfig({\n auth: (auth) => (auth.type === 'apiKey' ? apiKey : localStorage.getItem('token') ?? undefined),\n})",[23,518,519,197,530,197,598],{"class":165},[167,520,521,523,525,527],{"class":169,"style":170},[167,522,25],{"style":181},[167,524,222],{"style":173},[167,526,226],{"style":225},[167,528,529],{"style":177},"({",[167,531,532,535,537,539,542,544,547,549,551,553,555,558,561,564,567,570,572,575,577,580,582,585,587,590,592,595],{"class":169,"style":170},[167,533,534],{"style":177}," ",[167,536,126],{"style":177},[167,538,234],{"style":173},[167,540,541],{"style":177},"(",[167,543,126],{"style":181},[167,545,546],{"style":177},") ",[167,548,308],{"style":173},[167,550,541],{"style":177},[167,552,126],{"style":181},[167,554,222],{"style":173},[167,556,557],{"style":177},"type ",[167,559,560],{"style":173},"=== ",[167,562,563],{"style":195},"'apiKey' ",[167,565,566],{"style":173},"? ",[167,568,569],{"style":181},"apiKey ",[167,571,234],{"style":173},[167,573,574],{"style":181},"localStorage",[167,576,222],{"style":173},[167,578,579],{"style":225},"getItem",[167,581,541],{"style":177},[167,583,584],{"style":195},"'token'",[167,586,546],{"style":177},[167,588,589],{"style":173},"?? ",[167,591,512],{"style":177},[167,593,594],{"style":177},")",[167,596,597],{"style":173},",",[167,599,600],{"class":169,"style":170},[167,601,314],{"style":177},[11,603,604,605,607],{},"By default, ",[23,606,126],{}," adds no credentials. The scheme decides where the token goes:",[32,609,610,625],{},[35,611,612],{},[38,613,614,617,622],{},[41,615,616],{},"Scheme in the spec",[41,618,619,621],{},[23,620,126],{}," gets",[41,623,624],{},"The token goes to",[51,626,627,645,662,681,698,717,733],{},[38,628,629,635,640],{},[56,630,631,634],{},[23,632,633],{},"http"," bearer",[56,636,637],{},[23,638,639],{},"{ type: 'http', scheme: 'bearer' }",[56,641,642],{},[23,643,644],{},"Authorization: Bearer \u003Ctoken>",[38,646,647,652,657],{},[56,648,649,651],{},[23,650,633],{}," basic",[56,653,654],{},[23,655,656],{},"{ type: 'http', scheme: 'basic' }",[56,658,659],{},[23,660,661],{},"Authorization: Basic \u003Cbase64>",[38,663,664,670,675],{},[56,665,666,669],{},[23,667,668],{},"apiKey"," in header",[56,671,672],{},[23,673,674],{},"{ type: 'apiKey', name, in: 'header' }",[56,676,677,678],{},"the header named ",[23,679,680],{},"name",[38,682,683,688,693],{},[56,684,685,687],{},[23,686,668],{}," in query",[56,689,690],{},[23,691,692],{},"{ type: 'apiKey', name, in: 'query' }",[56,694,695,696],{},"the query parameter ",[23,697,680],{},[38,699,700,705,710],{},[56,701,702,704],{},[23,703,668],{}," in cookie",[56,706,707],{},[23,708,709],{},"{ type: 'apiKey', name, in: 'cookie' }",[56,711,712,713,716],{},"the ",[23,714,715],{},"Cookie"," header",[38,718,719,724,729],{},[56,720,721],{},[23,722,723],{},"oauth2",[56,725,726],{},[23,727,728],{},"{ type: 'oauth2', scopes, flows }",[56,730,731],{},[23,732,644],{},[38,734,735,740,745],{},[56,736,737],{},[23,738,739],{},"openIdConnect",[56,741,742],{},[23,743,744],{},"{ type: 'openIdConnect', scopes, url }",[56,746,747],{},[23,748,644],{},[469,750,751,752,755,756,759],{"as":471},"For basic auth, return the raw ",[23,753,754],{},"username:password",". The runtime base64-encodes it and adds the ",[23,757,758],{},"Basic"," prefix.",[11,761,762,763,490,767,222],{},"For a credential that no security scheme describes, such as a request signature, add a request interceptor. See ",[462,764,766],{"href":765},"#several-security-schemes","Several security schemes",[462,768,770],{"href":769},"#mutual-tls","Mutual TLS",[15,772,774],{"id":773},"add-interceptors","Add interceptors",[11,776,777,780],{},[23,778,779],{},"client.interceptors"," has three stacks. Each handler gets the value the one before it returned:",[32,782,783,799],{},[35,784,785],{},[38,786,787,790,793,796],{},[41,788,789],{},"Stack",[41,791,792],{},"Runs",[41,794,795],{},"Gets",[41,797,798],{},"Returns",[51,800,801,819,837],{},[38,802,803,808,811,816],{},[56,804,805],{},[23,806,807],{},"request",[56,809,810],{},"After the URL, body, and auth are built, before the send.",[56,812,813],{},[23,814,815],{},"ResolvedRequest",[56,817,818],{},"The request, or nothing to keep it.",[38,820,821,826,829,834],{},[56,822,823],{},[23,824,825],{},"response",[56,827,828],{},"After the body is decoded, before the status check and validator.",[56,830,831],{},[23,832,833],{},"DecodedResponse",[56,835,836],{},"The result, or nothing to keep it.",[38,838,839,844,854,857],{},[56,840,841],{},[23,842,843],{},"error",[56,845,846,847,850,851,222],{},"When a call fails: ",[23,848,849],{},"ResponseError",", network error, abort, ",[23,852,853],{},"ValidationError",[56,855,856],{},"The error",[56,858,859],{},"Another error to throw, or nothing to keep it.",[861,862,863,943,1034],"code-group",{},[158,864,866],{"language":160,"filename":807,"code":865,"class":162},"client.interceptors.request.use((request) => {\n request.headers['X-Request-ID'] = crypto.randomUUID()\n return request\n})",[23,867,868,197,898,197,930,197,939],{"class":165},[167,869,870,872,874,877,879,881,883,886,889,891,893,895],{"class":169,"style":170},[167,871,25],{"style":181},[167,873,222],{"style":173},[167,875,876],{"style":177},"interceptors",[167,878,222],{"style":173},[167,880,807],{"style":177},[167,882,222],{"style":173},[167,884,885],{"style":225},"use",[167,887,888],{"style":177},"((",[167,890,807],{"style":181},[167,892,546],{"style":177},[167,894,308],{"style":173},[167,896,897],{"style":177},"{",[167,899,900,902,904,906,908,911,914,917,919,922,924,927],{"class":169,"style":170},[167,901,534],{"style":177},[167,903,807],{"style":181},[167,905,222],{"style":173},[167,907,69],{"style":177},[167,909,910],{"style":177},"[",[167,912,913],{"style":195},"'X-Request-ID'",[167,915,916],{"style":177},"] ",[167,918,284],{"style":173},[167,920,921],{"style":181},"crypto",[167,923,222],{"style":173},[167,925,926],{"style":225},"randomUUID",[167,928,929],{"style":177},"()",[167,931,932,934,937],{"class":169,"style":170},[167,933,534],{"style":177},[167,935,936],{"style":173},"return ",[167,938,807],{"style":181},[167,940,941],{"class":169,"style":170},[167,942,314],{"style":177},[158,944,946],{"language":160,"filename":825,"code":945,"class":162},"client.interceptors.response.use((result) => {\n console.info(`${result.status} ${result.contentType}`)\n return result\n})",[23,947,948,197,975,197,1022,197,1030],{"class":165},[167,949,950,952,954,956,958,960,962,964,966,969,971,973],{"class":169,"style":170},[167,951,25],{"style":181},[167,953,222],{"style":173},[167,955,876],{"style":177},[167,957,222],{"style":173},[167,959,825],{"style":177},[167,961,222],{"style":173},[167,963,885],{"style":225},[167,965,888],{"style":177},[167,967,968],{"style":181},"result",[167,970,546],{"style":177},[167,972,308],{"style":173},[167,974,897],{"style":177},[167,976,977,979,982,984,987,989,992,995,997,999,1002,1004,1007,1009,1011,1013,1016,1018,1020],{"class":169,"style":170},[167,978,534],{"style":177},[167,980,981],{"style":181},"console",[167,983,222],{"style":173},[167,985,986],{"style":225},"info",[167,988,541],{"style":177},[167,990,991],{"style":195},"`",[167,993,994],{"style":181},"${",[167,996,968],{"style":181},[167,998,222],{"style":173},[167,1000,1001],{"style":177},"status",[167,1003,342],{"style":181},[167,1005,1006],{"style":195}," ",[167,1008,994],{"style":181},[167,1010,968],{"style":181},[167,1012,222],{"style":173},[167,1014,1015],{"style":177},"contentType",[167,1017,342],{"style":181},[167,1019,991],{"style":195},[167,1021,594],{"style":177},[167,1023,1024,1026,1028],{"class":169,"style":170},[167,1025,534],{"style":177},[167,1027,936],{"style":173},[167,1029,968],{"style":181},[167,1031,1032],{"class":169,"style":170},[167,1033,314],{"style":177},[158,1035,1037],{"language":160,"filename":843,"code":1036,"class":162},"import { client, ResponseError } from '.\u002Fgen\u002F.kubb\u002Fclient'\n\nclass NotFoundError extends Error {}\n\nclient.interceptors.error.use((error) => {\n if (ResponseError.is(error) && error.status === 401) scheduleTokenRefresh()\n if (ResponseError.is(error) && error.status === 404) return new NotFoundError(error.message)\n})",[23,1038,1039,197,1058,197,1060,197,1077,197,1079,197,1105,197,1149,197,1203],{"class":165},[167,1040,1041,1043,1045,1047,1049,1052,1054,1056],{"class":169,"style":170},[167,1042,174],{"style":173},[167,1044,178],{"style":177},[167,1046,25],{"style":181},[167,1048,70],{"style":173},[167,1050,1051],{"style":225},"ResponseError ",[167,1053,189],{"style":177},[167,1055,192],{"style":173},[167,1057,196],{"style":195},[167,1059],{"class":169,"style":170},[167,1061,1062,1065,1068,1071,1074],{"class":169,"style":170},[167,1063,1064],{"style":173},"class ",[167,1066,1067],{"style":225},"NotFoundError ",[167,1069,1070],{"style":173},"extends ",[167,1072,1073],{"style":225},"Error ",[167,1075,1076],{"style":177},"{}",[167,1078],{"class":169,"style":170},[167,1080,1081,1083,1085,1087,1089,1091,1093,1095,1097,1099,1101,1103],{"class":169,"style":170},[167,1082,25],{"style":181},[167,1084,222],{"style":173},[167,1086,876],{"style":177},[167,1088,222],{"style":173},[167,1090,843],{"style":177},[167,1092,222],{"style":173},[167,1094,885],{"style":225},[167,1096,888],{"style":177},[167,1098,843],{"style":181},[167,1100,546],{"style":177},[167,1102,308],{"style":173},[167,1104,897],{"style":177},[167,1106,1107,1109,1112,1114,1116,1118,1121,1123,1125,1127,1130,1132,1134,1137,1139,1142,1144,1147],{"class":169,"style":170},[167,1108,534],{"style":177},[167,1110,1111],{"style":173},"if ",[167,1113,541],{"style":177},[167,1115,849],{"style":225},[167,1117,222],{"style":173},[167,1119,1120],{"style":225},"is",[167,1122,541],{"style":177},[167,1124,843],{"style":181},[167,1126,546],{"style":177},[167,1128,1129],{"style":173},"&& ",[167,1131,843],{"style":181},[167,1133,222],{"style":173},[167,1135,1136],{"style":177},"status ",[167,1138,560],{"style":173},[167,1140,1141],{"style":177},"401",[167,1143,546],{"style":177},[167,1145,1146],{"style":225},"scheduleTokenRefresh",[167,1148,929],{"style":177},[167,1150,1151,1153,1155,1157,1159,1161,1163,1165,1167,1169,1171,1173,1175,1177,1179,1182,1184,1186,1189,1192,1194,1196,1198,1201],{"class":169,"style":170},[167,1152,534],{"style":177},[167,1154,1111],{"style":173},[167,1156,541],{"style":177},[167,1158,849],{"style":225},[167,1160,222],{"style":173},[167,1162,1120],{"style":225},[167,1164,541],{"style":177},[167,1166,843],{"style":181},[167,1168,546],{"style":177},[167,1170,1129],{"style":173},[167,1172,843],{"style":181},[167,1174,222],{"style":173},[167,1176,1136],{"style":177},[167,1178,560],{"style":173},[167,1180,1181],{"style":177},"404",[167,1183,546],{"style":177},[167,1185,936],{"style":173},[167,1187,1188],{"style":173},"new ",[167,1190,1191],{"style":225},"NotFoundError",[167,1193,541],{"style":177},[167,1195,843],{"style":181},[167,1197,222],{"style":173},[167,1199,1200],{"style":177},"message",[167,1202,594],{"style":177},[167,1204,1205],{"class":169,"style":170},[167,1206,314],{"style":177},[11,1208,1209,1211,1212,70,1215,70,1218,70,1220,70,1223,70,1226,70,1228,74,1230,149,1233,1211,1235,70,1238,70,1240,70,1243,70,1245,70,1247,74,1249,222],{},[23,1210,815],{}," has ",[23,1213,1214],{},"url",[23,1216,1217],{},"method",[23,1219,69],{},[23,1221,1222],{},"body",[23,1224,1225],{},"signal",[23,1227,129],{},[23,1229,132],{},[23,1231,1232],{},"stream",[23,1234,833],{},[23,1236,1237],{},"data",[23,1239,1001],{},[23,1241,1242],{},"statusText",[23,1244,69],{},[23,1246,1015],{},[23,1248,807],{},[23,1250,825],{},[11,1252,1253,1254,1256,1257,490,1260,1263],{},"Handlers run in the order you register them. ",[23,1255,885],{}," returns an id for ",[23,1258,1259],{},"eject",[23,1261,1262],{},"update",":",[158,1265,1267],{"language":160,"code":1266,"class":162},"const id = client.interceptors.request.use((request) => request)\nclient.interceptors.request.update(id, (request) => ({ ...request, headers: { ...request.headers, 'X-Trace': 'on' } }))\nclient.interceptors.request.eject(id)",[23,1268,1269,197,1304,197,1371],{"class":165},[167,1270,1271,1273,1276,1278,1280,1282,1284,1286,1288,1290,1292,1294,1296,1298,1300,1302],{"class":169,"style":170},[167,1272,278],{"style":173},[167,1274,1275],{"style":181},"id ",[167,1277,284],{"style":173},[167,1279,25],{"style":181},[167,1281,222],{"style":173},[167,1283,876],{"style":177},[167,1285,222],{"style":173},[167,1287,807],{"style":177},[167,1289,222],{"style":173},[167,1291,885],{"style":225},[167,1293,888],{"style":177},[167,1295,807],{"style":181},[167,1297,546],{"style":177},[167,1299,308],{"style":173},[167,1301,807],{"style":181},[167,1303,594],{"style":177},[167,1305,1306,1308,1310,1312,1314,1316,1318,1320,1322,1325,1327,1329,1331,1333,1335,1337,1340,1342,1344,1346,1348,1350,1352,1354,1356,1358,1360,1363,1365,1368],{"class":169,"style":170},[167,1307,25],{"style":181},[167,1309,222],{"style":173},[167,1311,876],{"style":177},[167,1313,222],{"style":173},[167,1315,807],{"style":177},[167,1317,222],{"style":173},[167,1319,1262],{"style":225},[167,1321,541],{"style":177},[167,1323,1324],{"style":181},"id",[167,1326,70],{"style":173},[167,1328,541],{"style":177},[167,1330,807],{"style":181},[167,1332,546],{"style":177},[167,1334,308],{"style":173},[167,1336,229],{"style":177},[167,1338,1339],{"style":173},"...",[167,1341,807],{"style":181},[167,1343,70],{"style":173},[167,1345,69],{"style":177},[167,1347,234],{"style":173},[167,1349,178],{"style":177},[167,1351,1339],{"style":173},[167,1353,807],{"style":181},[167,1355,222],{"style":173},[167,1357,69],{"style":177},[167,1359,70],{"style":173},[167,1361,1362],{"style":195},"'X-Trace'",[167,1364,234],{"style":173},[167,1366,1367],{"style":195},"'on' ",[167,1369,1370],{"style":177},"} }))",[167,1372,1373,1375,1377,1379,1381,1383,1385,1387,1389,1391],{"class":169,"style":170},[167,1374,25],{"style":181},[167,1376,222],{"style":173},[167,1378,876],{"style":177},[167,1380,222],{"style":173},[167,1382,807],{"style":177},[167,1384,222],{"style":173},[167,1386,1259],{"style":225},[167,1388,541],{"style":177},[167,1390,1324],{"style":181},[167,1392,594],{"style":177},[469,1394,1395,1396,1399,1400,1403],{"as":471},"With ",[23,1397,1398],{},"throwOnError: false",", a non-2xx response resolves, so no error handler runs for it. An error thrown while a stream is read, in the ",[23,1401,1402],{},"for await"," loop, does not reach the error handlers either.",[1405,1406,1408],"h3",{"id":1407},"native-axios-interceptors","Native axios interceptors",[11,1410,1411,1412,70,1415,1418,1419,1422,1423,1426],{},"For the native ",[23,1413,1414],{},"InternalAxiosRequestConfig",[23,1416,1417],{},"AxiosResponse",", or ",[23,1420,1421],{},"AxiosError",", register on the axios instance that ",[23,1424,1425],{},"getAxiosInstance()"," returns. Native response interceptors see the raw bytes, before Kubb decodes them:",[158,1428,1430],{"language":160,"code":1429,"class":162},"import { getAxiosInstance } from '.\u002Fgen\u002F.kubb\u002Fclient'\n\ngetAxiosInstance().interceptors.request.use((config) => {\n config.headers.set('traceparent', currentTraceparent())\n return config\n})",[23,1431,1432,197,1447,197,1449,197,1479,197,1507,197,1515],{"class":165},[167,1433,1434,1436,1438,1441,1443,1445],{"class":169,"style":170},[167,1435,174],{"style":173},[167,1437,178],{"style":177},[167,1439,1440],{"style":181},"getAxiosInstance ",[167,1442,189],{"style":177},[167,1444,192],{"style":173},[167,1446,196],{"style":195},[167,1448],{"class":169,"style":170},[167,1450,1451,1454,1456,1458,1460,1462,1464,1466,1468,1470,1473,1475,1477],{"class":169,"style":170},[167,1452,1453],{"style":225},"getAxiosInstance",[167,1455,929],{"style":177},[167,1457,222],{"style":173},[167,1459,876],{"style":177},[167,1461,222],{"style":173},[167,1463,807],{"style":177},[167,1465,222],{"style":173},[167,1467,885],{"style":225},[167,1469,888],{"style":177},[167,1471,1472],{"style":181},"config",[167,1474,546],{"style":177},[167,1476,308],{"style":173},[167,1478,897],{"style":177},[167,1480,1481,1483,1485,1487,1489,1491,1494,1496,1499,1501,1504],{"class":169,"style":170},[167,1482,534],{"style":177},[167,1484,1472],{"style":181},[167,1486,222],{"style":173},[167,1488,69],{"style":177},[167,1490,222],{"style":173},[167,1492,1493],{"style":225},"set",[167,1495,541],{"style":177},[167,1497,1498],{"style":195},"'traceparent'",[167,1500,70],{"style":173},[167,1502,1503],{"style":225},"currentTraceparent",[167,1505,1506],{"style":177},"())",[167,1508,1509,1511,1513],{"class":169,"style":170},[167,1510,534],{"style":177},[167,1512,936],{"style":173},[167,1514,1472],{"style":181},[167,1516,1517],{"class":169,"style":170},[167,1518,314],{"style":177},[11,1520,1521,1522,222],{},"For the order native and core handlers run in, see ",[462,1523,1525],{"href":1524},"#interceptor-order","Interceptor order",[11,1527,1528,1529,222],{},"Next, ",[462,1530,1532],{"href":1531},"https:\u002F\u002Fkubb.dev\u002Fextensions\u002Fkubb-labs\u002Fplugin-axios\u002Fguides\u002Ftransport","use a custom transport",[15,1534,1536],{"id":1535},"retry-a-failed-call","Retry a failed call",[11,1538,1539,1540,1542],{},"Retries are off by default. Set ",[23,1541,148],{}," on the client or on one call. A number is how many times a failed call is sent again:",[158,1544,1546],{"language":160,"code":1545,"class":162},"import { client } from '.\u002Fgen\u002F.kubb\u002Fclient'\n\nclient.setConfig({ retry: 2 })\n\nawait createOrder({ body, retry: { methods: ['POST'] } })\nawait chargeCard({ body, retry: false })",[23,1547,1548,197,1563,197,1565,197,1584,197,1586,197,1618],{"class":165},[167,1549,1550,1552,1554,1557,1559,1561],{"class":169,"style":170},[167,1551,174],{"style":173},[167,1553,178],{"style":177},[167,1555,1556],{"style":181},"client ",[167,1558,189],{"style":177},[167,1560,192],{"style":173},[167,1562,196],{"style":195},[167,1564],{"class":169,"style":170},[167,1566,1567,1569,1571,1573,1575,1577,1579,1582],{"class":169,"style":170},[167,1568,25],{"style":181},[167,1570,222],{"style":173},[167,1572,226],{"style":225},[167,1574,229],{"style":177},[167,1576,148],{"style":177},[167,1578,234],{"style":173},[167,1580,1581],{"style":177},"2 ",[167,1583,314],{"style":177},[167,1585],{"class":169,"style":170},[167,1587,1588,1590,1593,1595,1597,1599,1601,1603,1605,1608,1610,1612,1615],{"class":169,"style":170},[167,1589,319],{"style":173},[167,1591,1592],{"style":225},"createOrder",[167,1594,229],{"style":177},[167,1596,1222],{"style":181},[167,1598,70],{"style":173},[167,1600,148],{"style":177},[167,1602,234],{"style":173},[167,1604,178],{"style":177},[167,1606,1607],{"style":177},"methods",[167,1609,234],{"style":173},[167,1611,910],{"style":177},[167,1613,1614],{"style":195},"'POST'",[167,1616,1617],{"style":177},"] } })",[167,1619,1620,1622,1625,1627,1629,1631,1633,1635,1638],{"class":169,"style":170},[167,1621,319],{"style":173},[167,1623,1624],{"style":225},"chargeCard",[167,1626,229],{"style":177},[167,1628,1222],{"style":181},[167,1630,70],{"style":173},[167,1632,148],{"style":177},[167,1634,234],{"style":173},[167,1636,1637],{"style":177},"false ",[167,1639,314],{"style":177},[11,1641,1642,1643,1645,1646,1649],{},"A call's ",[23,1644,148],{}," merges per field over the client's, and ",[23,1647,1648],{},"false"," sends that call once. Pass an object for more control:",[32,1651,1652,1665],{},[35,1653,1654],{},[38,1655,1656,1659,1662],{},[41,1657,1658],{},"Option",[41,1660,1661],{},"What it does",[41,1663,1664],{},"Default",[51,1666,1667,1681,1710,1740,1760,1783],{},[38,1668,1669,1674,1677],{},[56,1670,1671],{},[23,1672,1673],{},"limit",[56,1675,1676],{},"How many times the call is sent again.",[56,1678,1679],{},[23,1680,423],{},[38,1682,1683,1687,1690],{},[56,1684,1685],{},[23,1686,1607],{},[56,1688,1689],{},"The methods that are safe to send twice.",[56,1691,1692,70,1695,70,1698,70,1701,70,1704,70,1707],{},[23,1693,1694],{},"GET",[23,1696,1697],{},"HEAD",[23,1699,1700],{},"OPTIONS",[23,1702,1703],{},"PUT",[23,1705,1706],{},"DELETE",[23,1708,1709],{},"TRACE",[38,1711,1712,1717,1720],{},[56,1713,1714],{},[23,1715,1716],{},"statusCodes",[56,1718,1719],{},"The statuses that are retried.",[56,1721,1722,70,1725,70,1728,70,1731,70,1734,70,1737],{},[23,1723,1724],{},"408",[23,1726,1727],{},"429",[23,1729,1730],{},"500",[23,1732,1733],{},"502",[23,1735,1736],{},"503",[23,1738,1739],{},"504",[38,1741,1742,1747,1757],{},[56,1743,1744],{},[23,1745,1746],{},"delay",[56,1748,1749,1752,1753,1756],{},[23,1750,1751],{},"(retryCount) => milliseconds"," to wait. ",[23,1754,1755],{},"retryCount"," starts at 1.",[56,1758,1759],{},"Exponential from 300 ms with jitter, up to 30 s",[38,1761,1762,1767,1780],{},[56,1763,1764],{},[23,1765,1766],{},"shouldRetry",[56,1768,1769,1772,1773,70,1776,1418,1778],{},[23,1770,1771],{},"({ request, response, error, retryCount })"," returns ",[23,1774,1775],{},"true",[23,1777,1648],{},[23,1779,512],{},[56,1781,1782],{},"The status and error check",[38,1784,1785,1790,1795],{},[56,1786,1787],{},[23,1788,1789],{},"onRetry",[56,1791,1792,1793,222],{},"Runs before each wait, with the same context plus ",[23,1794,1746],{},[56,1796,1797],{},"None",[158,1799,1801],{"language":160,"code":1800,"class":162},"client.setConfig({\n retry: {\n limit: 3,\n delay: (retryCount) => 1000 * retryCount,\n shouldRetry: ({ response }) => (response?.headers.get('x-no-retry') === 'true' ? false : undefined),\n onRetry: ({ retryCount, delay }) => console.warn(`Retry ${retryCount} in ${delay} ms`),\n },\n})",[23,1802,1803,197,1813,197,1823,197,1836,197,1862,197,1918,197,1973,197,1981],{"class":165},[167,1804,1805,1807,1809,1811],{"class":169,"style":170},[167,1806,25],{"style":181},[167,1808,222],{"style":173},[167,1810,226],{"style":225},[167,1812,529],{"style":177},[167,1814,1815,1817,1819,1821],{"class":169,"style":170},[167,1816,534],{"style":177},[167,1818,148],{"style":177},[167,1820,234],{"style":173},[167,1822,897],{"style":177},[167,1824,1825,1828,1830,1832,1834],{"class":169,"style":170},[167,1826,1827],{"style":177}," ",[167,1829,1673],{"style":177},[167,1831,234],{"style":173},[167,1833,437],{"style":177},[167,1835,597],{"style":173},[167,1837,1838,1840,1842,1844,1846,1848,1850,1852,1855,1858,1860],{"class":169,"style":170},[167,1839,1827],{"style":173},[167,1841,1746],{"style":177},[167,1843,234],{"style":173},[167,1845,541],{"style":177},[167,1847,1755],{"style":181},[167,1849,546],{"style":177},[167,1851,308],{"style":173},[167,1853,1854],{"style":177},"1000 ",[167,1856,1857],{"style":173},"* ",[167,1859,1755],{"style":181},[167,1861,597],{"style":173},[167,1863,1864,1866,1868,1870,1872,1875,1878,1880,1882,1884,1887,1889,1891,1894,1896,1899,1901,1903,1906,1908,1910,1912,1914,1916],{"class":169,"style":170},[167,1865,1827],{"style":173},[167,1867,1766],{"style":177},[167,1869,234],{"style":173},[167,1871,229],{"style":177},[167,1873,1874],{"style":181},"response ",[167,1876,1877],{"style":177},"}) ",[167,1879,308],{"style":173},[167,1881,541],{"style":177},[167,1883,825],{"style":181},[167,1885,1886],{"style":173},"?.",[167,1888,69],{"style":177},[167,1890,222],{"style":173},[167,1892,1893],{"style":225},"get",[167,1895,541],{"style":177},[167,1897,1898],{"style":195},"'x-no-retry'",[167,1900,546],{"style":177},[167,1902,560],{"style":173},[167,1904,1905],{"style":195},"'true' ",[167,1907,566],{"style":173},[167,1909,1637],{"style":177},[167,1911,234],{"style":173},[167,1913,512],{"style":177},[167,1915,594],{"style":177},[167,1917,597],{"style":173},[167,1919,1920,1922,1924,1926,1928,1930,1932,1935,1937,1939,1941,1943,1946,1948,1951,1953,1955,1957,1960,1962,1964,1966,1969,1971],{"class":169,"style":170},[167,1921,1827],{"style":173},[167,1923,1789],{"style":177},[167,1925,234],{"style":173},[167,1927,229],{"style":177},[167,1929,1755],{"style":181},[167,1931,70],{"style":173},[167,1933,1934],{"style":181},"delay ",[167,1936,1877],{"style":177},[167,1938,308],{"style":173},[167,1940,981],{"style":181},[167,1942,222],{"style":173},[167,1944,1945],{"style":225},"warn",[167,1947,541],{"style":177},[167,1949,1950],{"style":195},"`Retry ",[167,1952,994],{"style":181},[167,1954,1755],{"style":181},[167,1956,342],{"style":181},[167,1958,1959],{"style":195}," in ",[167,1961,994],{"style":181},[167,1963,1746],{"style":181},[167,1965,342],{"style":181},[167,1967,1968],{"style":195}," ms`",[167,1970,594],{"style":177},[167,1972,597],{"style":173},[167,1974,1975,1977,1979],{"class":169,"style":170},[167,1976,534],{"style":173},[167,1978,342],{"style":177},[167,1980,597],{"style":173},[167,1982,1983],{"class":169,"style":170},[167,1984,314],{"style":177},[11,1986,1987,1988,1990,1991,1994,1995,1772,1997,1263],{},"The client retries a status in ",[23,1989,1716],{}," and any error the transport throws, including its ",[23,1992,1993],{},"timeout",". These rules always apply, also when ",[23,1996,1766],{},[23,1998,1775],{},[2000,2001,2002,2015,2018,2025,2031],"ul",{},[2003,2004,2005,490,2008,2011,2012,2014],"li",{},[23,2006,2007],{},"POST",[23,2009,2010],{},"PATCH"," are retried only when ",[23,2013,1607],{}," names them.",[2003,2016,2017],{},"A stream body is never retried, because it cannot be read twice.",[2003,2019,2020,2021,2024],{},"A ",[23,2022,2023],{},"Retry-After"," header sets the wait. When it asks for more than a minute, the call is not retried.",[2003,2026,2027,2028,2030],{},"An aborted ",[23,2029,1225],{}," stops the wait and the retries.",[2003,2032,2033,2034,2036],{},"The request interceptors and the ",[23,2035,126],{}," resolver run once, so every retry sends the same headers.",[11,2038,2039,2040,2042,2043,222],{},"A streaming call uses the same ",[23,2041,148],{},", see ",[462,2044,2046],{"href":2045},"https:\u002F\u002Fkubb.dev\u002Fextensions\u002Fkubb-labs\u002Fplugin-axios\u002Fguides\u002Fserver-sent-events#stop-abort-and-resume","Stop, abort, and resume",[15,2048,2050],{"id":2049},"less-common-cases","Less common cases",[1405,2052,489],{"id":2053},"which-server-a-call-picks",[11,2055,2056,2057,2059,2060,2066,2067,2069,2070,2073,2074,2077,2078,222],{},"When an operation or path has its own ",[23,2058,429],{},", the ",[462,2061,2063],{"href":2062},"https:\u002F\u002Fkubb.dev\u002Fextensions\u002Fkubb-labs\u002Fadapter-oas\u002Foptions#server",[23,2064,2065],{},"server.index"," of ",[23,2068,482],{}," picks the entry, falling back to the first. A relative URL such as ",[23,2071,2072],{},"\u002Fv2",", or one with ",[23,2075,2076],{},"{variable}"," placeholders, is skipped, so the call uses the next source in ",[462,2079,391],{"href":2080},"#set-the-base-url",[11,2082,460,2083,2087,2088,2091,2092,2094,2095,222],{},[462,2084,2085],{"href":464},[23,2086,121],{}," option is written into ",[23,2089,2090],{},".kubb\u002Fconfig.ts",", which ",[23,2093,29],{}," passes to ",[23,2096,226],{},[1405,2098,494],{"id":2099},"named-servers",[11,2101,2102,2103,70,2105,2107,2108,1263],{},"When an OpenAPI 3.2 server has a ",[23,2104,680],{},[23,2106,29],{}," exports its URL in ",[23,2109,429],{},[861,2111,2112,2174],{},[158,2113,2117],{"language":2114,"filename":2115,"code":2116,"class":162},"yaml","petStore.yaml","servers:\n - url: https:\u002F\u002Fapi.example.com\n name: production\n - url: https:\u002F\u002Fstaging.example.com\n name: staging",[23,2118,2120,197,2126,197,2138,197,2149,197,2163],{"class":2119},"language-yaml",[167,2121,2122,2124],{"class":169,"style":170},[167,2123,429],{"style":177},[167,2125,1263],{"style":173},[167,2127,2128,2131,2133,2135],{"class":169,"style":170},[167,2129,2130],{"style":173}," - ",[167,2132,1214],{"style":177},[167,2134,234],{"style":173},[167,2136,2137],{"style":195},"https:\u002F\u002Fapi.example.com",[167,2139,2140,2142,2144,2146],{"class":169,"style":170},[167,2141,1827],{"style":195},[167,2143,680],{"style":177},[167,2145,234],{"style":173},[167,2147,2148],{"style":195},"production",[167,2150,2151,2153,2156,2158,2160],{"class":169,"style":170},[167,2152,534],{"style":195},[167,2154,2155],{"style":173},"- ",[167,2157,1214],{"style":177},[167,2159,234],{"style":173},[167,2161,2162],{"style":195},"https:\u002F\u002Fstaging.example.com",[167,2164,2165,2167,2169,2171],{"class":169,"style":170},[167,2166,1827],{"style":195},[167,2168,680],{"style":177},[167,2170,234],{"style":173},[167,2172,2173],{"style":195},"staging",[158,2175,2178],{"language":160,"filename":2176,"code":2177,"class":162},"src\u002Fapi.ts","import { client, servers } from '.\u002Fgen\u002F.kubb\u002Fclient'\n\nclient.setConfig({ baseURL: servers.staging })",[23,2179,2180,197,2199,197,2201],{"class":165},[167,2181,2182,2184,2186,2188,2190,2193,2195,2197],{"class":169,"style":170},[167,2183,174],{"style":173},[167,2185,178],{"style":177},[167,2187,25],{"style":181},[167,2189,70],{"style":173},[167,2191,2192],{"style":181},"servers ",[167,2194,189],{"style":177},[167,2196,192],{"style":173},[167,2198,196],{"style":195},[167,2200],{"class":169,"style":170},[167,2202,2203,2205,2207,2209,2211,2213,2215,2217,2219,2222],{"class":169,"style":170},[167,2204,25],{"style":181},[167,2206,222],{"style":173},[167,2208,226],{"style":225},[167,2210,229],{"style":177},[167,2212,121],{"style":177},[167,2214,234],{"style":173},[167,2216,429],{"style":181},[167,2218,222],{"style":173},[167,2220,2221],{"style":177},"staging ",[167,2223,314],{"style":177},[1405,2225,766],{"id":2226},"several-security-schemes",[11,2228,2229,2230,2232,2233,2236,2237,2239],{},"When an operation lists several security requirements, the runtime sends the first one whose schemes all get a token. A requirement that needs an API key and a session cookie sends both. A header or query key you set yourself wins over the token. An ",[23,2231,723],{}," scheme also passes ",[23,2234,2235],{},"metadataUrl"," to ",[23,2238,126],{}," when the spec has one.",[11,2241,2242,2244,2245,2248],{},[23,2243,29],{}," exports the spec's schemes by name as ",[23,2246,2247],{},"securitySchemes",", and each generated call points at its own, with the scopes it needs:",[158,2250,2252],{"language":160,"code":2251,"class":162},"security: [{ ...securitySchemes.petstore_auth, scopes: ['write:pets'] }]",[23,2253,2254],{"class":165},[167,2255,2256,2259,2261,2264,2266,2268,2270,2273,2275,2278,2280,2282,2285],{"class":169,"style":170},[167,2257,2258],{"style":181},"security",[167,2260,234],{"style":173},[167,2262,2263],{"style":177},"[{ ",[167,2265,1339],{"style":173},[167,2267,2247],{"style":181},[167,2269,222],{"style":173},[167,2271,2272],{"style":177},"petstore_auth",[167,2274,70],{"style":173},[167,2276,2277],{"style":177},"scopes",[167,2279,234],{"style":173},[167,2281,910],{"style":177},[167,2283,2284],{"style":195},"'write:pets'",[167,2286,2287],{"style":177},"] }]",[1405,2289,770],{"id":2290},"mutual-tls",[11,2292,2293,2294,2297,2298,2300],{},"When the spec has a ",[23,2295,2296],{},"mutualTLS"," scheme, ",[23,2299,2247],{}," leaves it out, because its credential is a client certificate on the connection, not on the request. In Node.js, give an axios instance the certificate:",[158,2302,2304],{"language":160,"code":2303,"class":162},"import { readFileSync } from 'node:fs'\nimport { Agent } from 'node:https'\nimport axios from 'axios'\nimport { client, createAxiosTransport } from '.\u002Fgen\u002F.kubb\u002Fclient'\n\nconst instance = axios.create({ httpsAgent: new Agent({ cert: readFileSync('client.crt'), key: readFileSync('client.key') }) })\n\nclient.setConfig({ transport: createAxiosTransport(instance) })",[23,2305,2306,197,2322,197,2338,197,2350,197,2369,197,2371,197,2434,197,2436],{"class":165},[167,2307,2308,2310,2312,2315,2317,2319],{"class":169,"style":170},[167,2309,174],{"style":173},[167,2311,178],{"style":177},[167,2313,2314],{"style":181},"readFileSync ",[167,2316,189],{"style":177},[167,2318,192],{"style":173},[167,2320,2321],{"style":195},"'node:fs'",[167,2323,2324,2326,2328,2331,2333,2335],{"class":169,"style":170},[167,2325,174],{"style":173},[167,2327,178],{"style":177},[167,2329,2330],{"style":225},"Agent ",[167,2332,189],{"style":177},[167,2334,192],{"style":173},[167,2336,2337],{"style":195},"'node:https'",[167,2339,2340,2342,2345,2347],{"class":169,"style":170},[167,2341,174],{"style":173},[167,2343,2344],{"style":181},"axios ",[167,2346,192],{"style":173},[167,2348,2349],{"style":195},"'axios'",[167,2351,2352,2354,2356,2358,2360,2363,2365,2367],{"class":169,"style":170},[167,2353,174],{"style":173},[167,2355,178],{"style":177},[167,2357,25],{"style":181},[167,2359,70],{"style":173},[167,2361,2362],{"style":181},"createAxiosTransport ",[167,2364,189],{"style":177},[167,2366,192],{"style":173},[167,2368,196],{"style":195},[167,2370],{"class":169,"style":170},[167,2372,2373,2375,2378,2380,2383,2385,2388,2390,2393,2395,2397,2400,2402,2405,2407,2410,2412,2415,2417,2419,2422,2424,2426,2428,2431],{"class":169,"style":170},[167,2374,278],{"style":173},[167,2376,2377],{"style":181},"instance ",[167,2379,284],{"style":173},[167,2381,2382],{"style":181},"axios",[167,2384,222],{"style":173},[167,2386,2387],{"style":225},"create",[167,2389,229],{"style":177},[167,2391,2392],{"style":177},"httpsAgent",[167,2394,234],{"style":173},[167,2396,1188],{"style":173},[167,2398,2399],{"style":225},"Agent",[167,2401,229],{"style":177},[167,2403,2404],{"style":177},"cert",[167,2406,234],{"style":173},[167,2408,2409],{"style":225},"readFileSync",[167,2411,541],{"style":177},[167,2413,2414],{"style":195},"'client.crt'",[167,2416,594],{"style":177},[167,2418,70],{"style":173},[167,2420,2421],{"style":177},"key",[167,2423,234],{"style":173},[167,2425,2409],{"style":225},[167,2427,541],{"style":177},[167,2429,2430],{"style":195},"'client.key'",[167,2432,2433],{"style":177},") }) })",[167,2435],{"class":169,"style":170},[167,2437,2438,2440,2442,2444,2446,2448,2450,2453,2455,2458],{"class":169,"style":170},[167,2439,25],{"style":181},[167,2441,222],{"style":173},[167,2443,226],{"style":225},[167,2445,229],{"style":177},[167,2447,135],{"style":177},[167,2449,234],{"style":173},[167,2451,2452],{"style":225},"createAxiosTransport",[167,2454,541],{"style":177},[167,2456,2457],{"style":181},"instance",[167,2459,2460],{"style":177},") })",[11,2462,2463],{},"In the browser, the browser picks the client certificate itself.",[1405,2465,1525],{"id":2466},"interceptor-order",[11,2468,2469,2470,2474,2475,1263],{},"When you register ",[462,2471,2473],{"href":2472},"#native-axios-interceptors","native axios interceptors"," next to ",[23,2476,779],{},[2000,2478,2479,2486,2489],{},[2003,2480,2481,2482,2485],{},"Native request interceptors run after the ",[23,2483,2484],{},"client.interceptors.request"," handlers, in reverse order of registration, as axios runs them.",[2003,2487,2488],{},"Native response interceptors see the raw bytes, before Kubb decodes them.",[2003,2490,2491,2492,2494],{},"An instance you pass to ",[23,2493,2452],{}," keeps its own interceptors.",{"title":2496,"searchDepth":2497,"depth":2497,"links":2498},"",5,[2499,2501,2502,2503,2507,2508],{"id":17,"depth":2500,"text":18},2,{"id":390,"depth":2500,"text":391},{"id":497,"depth":2500,"text":498},{"id":773,"depth":2500,"text":774,"children":2504},[2505],{"id":1407,"depth":2506,"text":1408},3,{"id":1535,"depth":2500,"text":1536},{"id":2049,"depth":2500,"text":2050,"children":2509},[2510,2511,2512,2513,2514],{"id":2053,"depth":2506,"text":489},{"id":2099,"depth":2506,"text":494},{"id":2226,"depth":2506,"text":766},{"id":2290,"depth":2506,"text":770},{"id":2466,"depth":2506,"text":1525},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-axios\u002Fguides\u002Fconfigure-requests",1795727683388,"1b64b1eb-29b7-4f90-ad41-6f24721e1669"]