1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225 |
- /**
- * @license Angular v16.2.9
- * (c) 2010-2022 Google LLC. https://angular.io/
- * License: MIT
- */
- import { EnvironmentInjector } from '@angular/core';
- import { EnvironmentProviders } from '@angular/core';
- import * as i0 from '@angular/core';
- import { InjectionToken } from '@angular/core';
- import { ModuleWithProviders } from '@angular/core';
- import { Observable } from 'rxjs';
- import { Provider } from '@angular/core';
- import { XhrFactory } from '@angular/common';
- /**
- * Uses `fetch` to send requests to a backend server.
- *
- * This `FetchBackend` requires the support of the
- * [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) which is available on all
- * supported browsers and on Node.js v18 or later.
- *
- * @see {@link HttpHandler}
- *
- * @publicApi
- * @developerPreview
- */
- export declare class FetchBackend implements HttpBackend {
- private readonly fetchImpl;
- private readonly ngZone;
- handle(request: HttpRequest<any>): Observable<HttpEvent<any>>;
- private doRequest;
- private parseBody;
- private createRequestInit;
- private concatChunks;
- static ɵfac: i0.ɵɵFactoryDeclaration<FetchBackend, never>;
- static ɵprov: i0.ɵɵInjectableDeclaration<FetchBackend>;
- }
- /**
- * A multi-provider token that represents the array of registered
- * `HttpInterceptor` objects.
- *
- * @publicApi
- */
- export declare const HTTP_INTERCEPTORS: InjectionToken<HttpInterceptor[]>;
- /**
- * A final `HttpHandler` which will dispatch the request via browser HTTP APIs to a backend.
- *
- * Interceptors sit between the `HttpClient` interface and the `HttpBackend`.
- *
- * When injected, `HttpBackend` dispatches requests directly to the backend, without going
- * through the interceptor chain.
- *
- * @publicApi
- */
- export declare abstract class HttpBackend implements HttpHandler {
- abstract handle(req: HttpRequest<any>): Observable<HttpEvent<any>>;
- }
- /**
- * Performs HTTP requests.
- * This service is available as an injectable class, with methods to perform HTTP requests.
- * Each request method has multiple signatures, and the return type varies based on
- * the signature that is called (mainly the values of `observe` and `responseType`).
- *
- * Note that the `responseType` *options* value is a String that identifies the
- * single data type of the response.
- * A single overload version of the method handles each response type.
- * The value of `responseType` cannot be a union, as the combined signature could imply.
- *
- * @usageNotes
- * Sample HTTP requests for the [Tour of Heroes](/tutorial/tour-of-heroes/toh-pt0) application.
- *
- * ### HTTP Request Example
- *
- * ```
- * // GET heroes whose name contains search term
- * searchHeroes(term: string): observable<Hero[]>{
- *
- * const params = new HttpParams({fromString: 'name=term'});
- * return this.httpClient.request('GET', this.heroesUrl, {responseType:'json', params});
- * }
- * ```
- *
- * Alternatively, the parameter string can be used without invoking HttpParams
- * by directly joining to the URL.
- * ```
- * this.httpClient.request('GET', this.heroesUrl + '?' + 'name=term', {responseType:'json'});
- * ```
- *
- *
- * ### JSONP Example
- * ```
- * requestJsonp(url, callback = 'callback') {
- * return this.httpClient.jsonp(this.heroesURL, callback);
- * }
- * ```
- *
- * ### PATCH Example
- * ```
- * // PATCH one of the heroes' name
- * patchHero (id: number, heroName: string): Observable<{}> {
- * const url = `${this.heroesUrl}/${id}`; // PATCH api/heroes/42
- * return this.httpClient.patch(url, {name: heroName}, httpOptions)
- * .pipe(catchError(this.handleError('patchHero')));
- * }
- * ```
- *
- * @see [HTTP Guide](guide/understanding-communicating-with-http)
- * @see [HTTP Request](api/common/http/HttpRequest)
- *
- * @publicApi
- */
- export declare class HttpClient {
- private handler;
- constructor(handler: HttpHandler);
- /**
- * Sends an `HttpRequest` and returns a stream of `HttpEvent`s.
- *
- * @return An `Observable` of the response, with the response body as a stream of `HttpEvent`s.
- */
- request<R>(req: HttpRequest<any>): Observable<HttpEvent<R>>;
- /**
- * Constructs a request that interprets the body as an `ArrayBuffer` and returns the response in
- * an `ArrayBuffer`.
- *
- * @param method The HTTP method.
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- *
- * @return An `Observable` of the response, with the response body as an `ArrayBuffer`.
- */
- request(method: string, url: string, options: {
- body?: any;
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- observe?: 'body';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'arraybuffer';
- withCredentials?: boolean;
- }): Observable<ArrayBuffer>;
- /**
- * Constructs a request that interprets the body as a blob and returns
- * the response as a blob.
- *
- * @param method The HTTP method.
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the response, with the response body of type `Blob`.
- */
- request(method: string, url: string, options: {
- body?: any;
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- observe?: 'body';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'blob';
- withCredentials?: boolean;
- }): Observable<Blob>;
- /**
- * Constructs a request that interprets the body as a text string and
- * returns a string value.
- *
- * @param method The HTTP method.
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the response, with the response body of type string.
- */
- request(method: string, url: string, options: {
- body?: any;
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- observe?: 'body';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'text';
- withCredentials?: boolean;
- }): Observable<string>;
- /**
- * Constructs a request that interprets the body as an `ArrayBuffer` and returns the
- * the full event stream.
- *
- * @param method The HTTP method.
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the response, with the response body as an array of `HttpEvent`s for
- * the request.
- */
- request(method: string, url: string, options: {
- body?: any;
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- observe: 'events';
- reportProgress?: boolean;
- responseType: 'arraybuffer';
- withCredentials?: boolean;
- }): Observable<HttpEvent<ArrayBuffer>>;
- /**
- * Constructs a request that interprets the body as a `Blob` and returns
- * the full event stream.
- *
- * @param method The HTTP method.
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of all `HttpEvent`s for the request,
- * with the response body of type `Blob`.
- */
- request(method: string, url: string, options: {
- body?: any;
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'events';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'blob';
- withCredentials?: boolean;
- }): Observable<HttpEvent<Blob>>;
- /**
- * Constructs a request which interprets the body as a text string and returns the full event
- * stream.
- *
- * @param method The HTTP method.
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of all `HttpEvent`s for the request,
- * with the response body of type string.
- */
- request(method: string, url: string, options: {
- body?: any;
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'events';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'text';
- withCredentials?: boolean;
- }): Observable<HttpEvent<string>>;
- /**
- * Constructs a request which interprets the body as a JavaScript object and returns the full
- * event stream.
- *
- * @param method The HTTP method.
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of all `HttpEvent`s for the request,
- * with the response body of type `Object`.
- */
- request(method: string, url: string, options: {
- body?: any;
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- reportProgress?: boolean;
- observe: 'events';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- responseType?: 'json';
- withCredentials?: boolean;
- }): Observable<HttpEvent<any>>;
- /**
- * Constructs a request which interprets the body as a JavaScript object and returns the full
- * event stream.
- *
- * @param method The HTTP method.
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of all `HttpEvent`s for the request,
- * with the response body of type `R`.
- */
- request<R>(method: string, url: string, options: {
- body?: any;
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- reportProgress?: boolean;
- observe: 'events';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- responseType?: 'json';
- withCredentials?: boolean;
- }): Observable<HttpEvent<R>>;
- /**
- * Constructs a request which interprets the body as an `ArrayBuffer`
- * and returns the full `HttpResponse`.
- *
- * @param method The HTTP method.
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the `HttpResponse`, with the response body as an `ArrayBuffer`.
- */
- request(method: string, url: string, options: {
- body?: any;
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'response';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'arraybuffer';
- withCredentials?: boolean;
- }): Observable<HttpResponse<ArrayBuffer>>;
- /**
- * Constructs a request which interprets the body as a `Blob` and returns the full `HttpResponse`.
- *
- * @param method The HTTP method.
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the `HttpResponse`, with the response body of type `Blob`.
- */
- request(method: string, url: string, options: {
- body?: any;
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'response';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'blob';
- withCredentials?: boolean;
- }): Observable<HttpResponse<Blob>>;
- /**
- * Constructs a request which interprets the body as a text stream and returns the full
- * `HttpResponse`.
- *
- * @param method The HTTP method.
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the HTTP response, with the response body of type string.
- */
- request(method: string, url: string, options: {
- body?: any;
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'response';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'text';
- withCredentials?: boolean;
- }): Observable<HttpResponse<string>>;
- /**
- * Constructs a request which interprets the body as a JavaScript object and returns the full
- * `HttpResponse`.
- *
- * @param method The HTTP method.
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the full `HttpResponse`,
- * with the response body of type `Object`.
- */
- request(method: string, url: string, options: {
- body?: any;
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- reportProgress?: boolean;
- observe: 'response';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- responseType?: 'json';
- withCredentials?: boolean;
- }): Observable<HttpResponse<Object>>;
- /**
- * Constructs a request which interprets the body as a JavaScript object and returns
- * the full `HttpResponse` with the response body in the requested type.
- *
- * @param method The HTTP method.
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the full `HttpResponse`, with the response body of type `R`.
- */
- request<R>(method: string, url: string, options: {
- body?: any;
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- reportProgress?: boolean;
- observe: 'response';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- responseType?: 'json';
- withCredentials?: boolean;
- }): Observable<HttpResponse<R>>;
- /**
- * Constructs a request which interprets the body as a JavaScript object and returns the full
- * `HttpResponse` as a JavaScript object.
- *
- * @param method The HTTP method.
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the `HttpResponse`, with the response body of type `Object`.
- */
- request(method: string, url: string, options?: {
- body?: any;
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- observe?: 'body';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- responseType?: 'json';
- reportProgress?: boolean;
- withCredentials?: boolean;
- }): Observable<Object>;
- /**
- * Constructs a request which interprets the body as a JavaScript object
- * with the response body of the requested type.
- *
- * @param method The HTTP method.
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the `HttpResponse`, with the response body of type `R`.
- */
- request<R>(method: string, url: string, options?: {
- body?: any;
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- observe?: 'body';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- responseType?: 'json';
- reportProgress?: boolean;
- withCredentials?: boolean;
- }): Observable<R>;
- /**
- * Constructs a request where response type and requested observable are not known statically.
- *
- * @param method The HTTP method.
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the requested response, with body of type `any`.
- */
- request(method: string, url: string, options?: {
- body?: any;
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- observe?: 'body' | 'events' | 'response';
- reportProgress?: boolean;
- responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
- withCredentials?: boolean;
- }): Observable<any>;
- /**
- * Constructs a `DELETE` request that interprets the body as an `ArrayBuffer`
- * and returns the response as an `ArrayBuffer`.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the response body as an `ArrayBuffer`.
- */
- delete(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- observe?: 'body';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'arraybuffer';
- withCredentials?: boolean;
- body?: any | null;
- }): Observable<ArrayBuffer>;
- /**
- * Constructs a `DELETE` request that interprets the body as a `Blob` and returns
- * the response as a `Blob`.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the response body as a `Blob`.
- */
- delete(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- observe?: 'body';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'blob';
- withCredentials?: boolean;
- body?: any | null;
- }): Observable<Blob>;
- /**
- * Constructs a `DELETE` request that interprets the body as a text string and returns
- * a string.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the response, with the response body of type string.
- */
- delete(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- observe?: 'body';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'text';
- withCredentials?: boolean;
- body?: any | null;
- }): Observable<string>;
- /**
- * Constructs a `DELETE` request that interprets the body as an `ArrayBuffer`
- * and returns the full event stream.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of all `HttpEvent`s for the request,
- * with response body as an `ArrayBuffer`.
- */
- delete(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'events';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'arraybuffer';
- withCredentials?: boolean;
- body?: any | null;
- }): Observable<HttpEvent<ArrayBuffer>>;
- /**
- * Constructs a `DELETE` request that interprets the body as a `Blob`
- * and returns the full event stream.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of all the `HttpEvent`s for the request, with the response body as a
- * `Blob`.
- */
- delete(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'events';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'blob';
- withCredentials?: boolean;
- body?: any | null;
- }): Observable<HttpEvent<Blob>>;
- /**
- * Constructs a `DELETE` request that interprets the body as a text string
- * and returns the full event stream.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of all `HttpEvent`s for the request, with the response
- * body of type string.
- */
- delete(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'events';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'text';
- withCredentials?: boolean;
- body?: any | null;
- }): Observable<HttpEvent<string>>;
- /**
- * Constructs a `DELETE` request that interprets the body as JSON
- * and returns the full event stream.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of all `HttpEvent`s for the request, with response body of
- * type `Object`.
- */
- delete(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'events';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType?: 'json';
- withCredentials?: boolean;
- body?: any | null;
- }): Observable<HttpEvent<Object>>;
- /**
- * Constructs a `DELETE`request that interprets the body as JSON
- * and returns the full event stream.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of all the `HttpEvent`s for the request, with a response
- * body in the requested type.
- */
- delete<T>(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'events';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | (string | number | boolean)[];
- };
- reportProgress?: boolean;
- responseType?: 'json';
- withCredentials?: boolean;
- body?: any | null;
- }): Observable<HttpEvent<T>>;
- /**
- * Constructs a `DELETE` request that interprets the body as an `ArrayBuffer` and returns
- * the full `HttpResponse`.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the full `HttpResponse`, with the response body as an `ArrayBuffer`.
- */
- delete(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'response';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'arraybuffer';
- withCredentials?: boolean;
- body?: any | null;
- }): Observable<HttpResponse<ArrayBuffer>>;
- /**
- * Constructs a `DELETE` request that interprets the body as a `Blob` and returns the full
- * `HttpResponse`.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the `HttpResponse`, with the response body of type `Blob`.
- */
- delete(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'response';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'blob';
- withCredentials?: boolean;
- body?: any | null;
- }): Observable<HttpResponse<Blob>>;
- /**
- * Constructs a `DELETE` request that interprets the body as a text stream and
- * returns the full `HttpResponse`.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the full `HttpResponse`, with the response body of type string.
- */
- delete(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'response';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'text';
- withCredentials?: boolean;
- body?: any | null;
- }): Observable<HttpResponse<string>>;
- /**
- * Constructs a `DELETE` request the interprets the body as a JavaScript object and returns
- * the full `HttpResponse`.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the `HttpResponse`, with the response body of type `Object`.
- *
- */
- delete(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'response';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType?: 'json';
- withCredentials?: boolean;
- body?: any | null;
- }): Observable<HttpResponse<Object>>;
- /**
- * Constructs a `DELETE` request that interprets the body as JSON
- * and returns the full `HttpResponse`.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the `HttpResponse`, with the response body of the requested type.
- */
- delete<T>(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'response';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType?: 'json';
- withCredentials?: boolean;
- body?: any | null;
- }): Observable<HttpResponse<T>>;
- /**
- * Constructs a `DELETE` request that interprets the body as JSON and
- * returns the response body as an object parsed from JSON.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the response, with the response body of type `Object`.
- */
- delete(url: string, options?: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- observe?: 'body';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType?: 'json';
- withCredentials?: boolean;
- body?: any | null;
- }): Observable<Object>;
- /**
- * Constructs a DELETE request that interprets the body as JSON and returns
- * the response in a given type.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the `HttpResponse`, with response body in the requested type.
- */
- delete<T>(url: string, options?: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- observe?: 'body';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType?: 'json';
- withCredentials?: boolean;
- body?: any | null;
- }): Observable<T>;
- /**
- * Constructs a `GET` request that interprets the body as an `ArrayBuffer` and returns the
- * response in an `ArrayBuffer`.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the response, with the response body as an `ArrayBuffer`.
- */
- get(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- observe?: 'body';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'arraybuffer';
- withCredentials?: boolean;
- }): Observable<ArrayBuffer>;
- /**
- * Constructs a `GET` request that interprets the body as a `Blob`
- * and returns the response as a `Blob`.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the response, with the response body as a `Blob`.
- */
- get(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- observe?: 'body';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'blob';
- withCredentials?: boolean;
- }): Observable<Blob>;
- /**
- * Constructs a `GET` request that interprets the body as a text string
- * and returns the response as a string value.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the response, with the response body of type string.
- */
- get(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- observe?: 'body';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'text';
- withCredentials?: boolean;
- }): Observable<string>;
- /**
- * Constructs a `GET` request that interprets the body as an `ArrayBuffer` and returns
- * the full event stream.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of all `HttpEvent`s for the request, with the response
- * body as an `ArrayBuffer`.
- */
- get(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'events';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'arraybuffer';
- withCredentials?: boolean;
- }): Observable<HttpEvent<ArrayBuffer>>;
- /**
- * Constructs a `GET` request that interprets the body as a `Blob` and
- * returns the full event stream.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the response, with the response body as a `Blob`.
- */
- get(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'events';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'blob';
- withCredentials?: boolean;
- }): Observable<HttpEvent<Blob>>;
- /**
- * Constructs a `GET` request that interprets the body as a text string and returns
- * the full event stream.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the response, with the response body of type string.
- */
- get(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'events';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'text';
- withCredentials?: boolean;
- }): Observable<HttpEvent<string>>;
- /**
- * Constructs a `GET` request that interprets the body as JSON
- * and returns the full event stream.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the response, with the response body of type `Object`.
- */
- get(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'events';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType?: 'json';
- withCredentials?: boolean;
- }): Observable<HttpEvent<Object>>;
- /**
- * Constructs a `GET` request that interprets the body as JSON and returns the full
- * event stream.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the response, with a response body in the requested type.
- */
- get<T>(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'events';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType?: 'json';
- withCredentials?: boolean;
- }): Observable<HttpEvent<T>>;
- /**
- * Constructs a `GET` request that interprets the body as an `ArrayBuffer` and
- * returns the full `HttpResponse`.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the `HttpResponse` for the request,
- * with the response body as an `ArrayBuffer`.
- */
- get(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'response';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'arraybuffer';
- withCredentials?: boolean;
- }): Observable<HttpResponse<ArrayBuffer>>;
- /**
- * Constructs a `GET` request that interprets the body as a `Blob` and
- * returns the full `HttpResponse`.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the `HttpResponse` for the request,
- * with the response body as a `Blob`.
- */
- get(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'response';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'blob';
- withCredentials?: boolean;
- }): Observable<HttpResponse<Blob>>;
- /**
- * Constructs a `GET` request that interprets the body as a text stream and
- * returns the full `HttpResponse`.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the `HttpResponse` for the request,
- * with the response body of type string.
- */
- get(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'response';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'text';
- withCredentials?: boolean;
- }): Observable<HttpResponse<string>>;
- /**
- * Constructs a `GET` request that interprets the body as JSON and
- * returns the full `HttpResponse`.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the full `HttpResponse`,
- * with the response body of type `Object`.
- */
- get(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'response';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType?: 'json';
- withCredentials?: boolean;
- }): Observable<HttpResponse<Object>>;
- /**
- * Constructs a `GET` request that interprets the body as JSON and
- * returns the full `HttpResponse`.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the full `HttpResponse` for the request,
- * with a response body in the requested type.
- */
- get<T>(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'response';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType?: 'json';
- withCredentials?: boolean;
- }): Observable<HttpResponse<T>>;
- /**
- * Constructs a `GET` request that interprets the body as JSON and
- * returns the response body as an object parsed from JSON.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- *
- * @return An `Observable` of the response body as a JavaScript object.
- */
- get(url: string, options?: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- observe?: 'body';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType?: 'json';
- withCredentials?: boolean;
- }): Observable<Object>;
- /**
- * Constructs a `GET` request that interprets the body as JSON and returns
- * the response body in a given type.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the `HttpResponse`, with a response body in the requested type.
- */
- get<T>(url: string, options?: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- observe?: 'body';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType?: 'json';
- withCredentials?: boolean;
- }): Observable<T>;
- /**
- * Constructs a `HEAD` request that interprets the body as an `ArrayBuffer` and
- * returns the response as an `ArrayBuffer`.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the response, with the response body as an `ArrayBuffer`.
- */
- head(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- observe?: 'body';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'arraybuffer';
- withCredentials?: boolean;
- }): Observable<ArrayBuffer>;
- /**
- * Constructs a `HEAD` request that interprets the body as a `Blob` and returns
- * the response as a `Blob`.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the response, with the response body as a `Blob`.
- */
- head(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- observe?: 'body';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'blob';
- withCredentials?: boolean;
- }): Observable<Blob>;
- /**
- * Constructs a `HEAD` request that interprets the body as a text string and returns the response
- * as a string value.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the response, with the response body of type string.
- */
- head(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- observe?: 'body';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'text';
- withCredentials?: boolean;
- }): Observable<string>;
- /**
- * Constructs a `HEAD` request that interprets the body as an `ArrayBuffer`
- * and returns the full event stream.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of all `HttpEvent`s for the request,
- * with the response body as an `ArrayBuffer`.
- */
- head(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'events';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'arraybuffer';
- withCredentials?: boolean;
- }): Observable<HttpEvent<ArrayBuffer>>;
- /**
- * Constructs a `HEAD` request that interprets the body as a `Blob` and
- * returns the full event stream.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of all `HttpEvent`s for the request,
- * with the response body as a `Blob`.
- */
- head(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'events';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'blob';
- withCredentials?: boolean;
- }): Observable<HttpEvent<Blob>>;
- /**
- * Constructs a `HEAD` request that interprets the body as a text string
- * and returns the full event stream.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of all `HttpEvent`s for the request, with the response body of type
- * string.
- */
- head(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'events';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'text';
- withCredentials?: boolean;
- }): Observable<HttpEvent<string>>;
- /**
- * Constructs a `HEAD` request that interprets the body as JSON
- * and returns the full HTTP event stream.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of all `HttpEvent`s for the request, with a response body of
- * type `Object`.
- */
- head(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'events';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType?: 'json';
- withCredentials?: boolean;
- }): Observable<HttpEvent<Object>>;
- /**
- * Constructs a `HEAD` request that interprets the body as JSON and
- * returns the full event stream.
- *
- * @return An `Observable` of all the `HttpEvent`s for the request,
- * with a response body in the requested type.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- */
- head<T>(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'events';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType?: 'json';
- withCredentials?: boolean;
- }): Observable<HttpEvent<T>>;
- /**
- * Constructs a `HEAD` request that interprets the body as an `ArrayBuffer`
- * and returns the full HTTP response.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the `HttpResponse` for the request,
- * with the response body as an `ArrayBuffer`.
- */
- head(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'response';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'arraybuffer';
- withCredentials?: boolean;
- }): Observable<HttpResponse<ArrayBuffer>>;
- /**
- * Constructs a `HEAD` request that interprets the body as a `Blob` and returns
- * the full `HttpResponse`.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the `HttpResponse` for the request,
- * with the response body as a blob.
- */
- head(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'response';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'blob';
- withCredentials?: boolean;
- }): Observable<HttpResponse<Blob>>;
- /**
- * Constructs a `HEAD` request that interprets the body as text stream
- * and returns the full `HttpResponse`.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the `HttpResponse` for the request,
- * with the response body of type string.
- */
- head(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'response';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'text';
- withCredentials?: boolean;
- }): Observable<HttpResponse<string>>;
- /**
- * Constructs a `HEAD` request that interprets the body as JSON and
- * returns the full `HttpResponse`.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the `HttpResponse` for the request,
- * with the response body of type `Object`.
- */
- head(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'response';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType?: 'json';
- withCredentials?: boolean;
- }): Observable<HttpResponse<Object>>;
- /**
- * Constructs a `HEAD` request that interprets the body as JSON
- * and returns the full `HttpResponse`.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the `HttpResponse` for the request,
- * with a response body of the requested type.
- */
- head<T>(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'response';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType?: 'json';
- withCredentials?: boolean;
- }): Observable<HttpResponse<T>>;
- /**
- * Constructs a `HEAD` request that interprets the body as JSON and
- * returns the response body as an object parsed from JSON.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the response, with the response body as an object parsed from JSON.
- */
- head(url: string, options?: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- observe?: 'body';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType?: 'json';
- withCredentials?: boolean;
- }): Observable<Object>;
- /**
- * Constructs a `HEAD` request that interprets the body as JSON and returns
- * the response in a given type.
- *
- * @param url The endpoint URL.
- * @param options The HTTP options to send with the request.
- *
- * @return An `Observable` of the `HttpResponse` for the request,
- * with a response body of the given type.
- */
- head<T>(url: string, options?: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- observe?: 'body';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType?: 'json';
- withCredentials?: boolean;
- }): Observable<T>;
- /**
- * Constructs a `JSONP` request for the given URL and name of the callback parameter.
- *
- * @param url The resource URL.
- * @param callbackParam The callback function name.
- *
- * @return An `Observable` of the response object, with response body as an object.
- */
- jsonp(url: string, callbackParam: string): Observable<Object>;
- /**
- * Constructs a `JSONP` request for the given URL and name of the callback parameter.
- *
- * @param url The resource URL.
- * @param callbackParam The callback function name.
- *
- * You must install a suitable interceptor, such as one provided by `HttpClientJsonpModule`.
- * If no such interceptor is reached,
- * then the `JSONP` request can be rejected by the configured backend.
- *
- * @return An `Observable` of the response object, with response body in the requested type.
- */
- jsonp<T>(url: string, callbackParam: string): Observable<T>;
- /**
- * Constructs an `OPTIONS` request that interprets the body as an
- * `ArrayBuffer` and returns the response as an `ArrayBuffer`.
- *
- * @param url The endpoint URL.
- * @param options HTTP options.
- *
- * @return An `Observable` of the response, with the response body as an `ArrayBuffer`.
- */
- options(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- observe?: 'body';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'arraybuffer';
- withCredentials?: boolean;
- }): Observable<ArrayBuffer>;
- /**
- * Constructs an `OPTIONS` request that interprets the body as a `Blob` and returns
- * the response as a `Blob`.
- *
- * @param url The endpoint URL.
- * @param options HTTP options.
- *
- * @return An `Observable` of the response, with the response body as a `Blob`.
- */
- options(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- observe?: 'body';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'blob';
- withCredentials?: boolean;
- }): Observable<Blob>;
- /**
- * Constructs an `OPTIONS` request that interprets the body as a text string and
- * returns a string value.
- *
- * @param url The endpoint URL.
- * @param options HTTP options.
- *
- * @return An `Observable` of the response, with the response body of type string.
- */
- options(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- observe?: 'body';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'text';
- withCredentials?: boolean;
- }): Observable<string>;
- /**
- * Constructs an `OPTIONS` request that interprets the body as an `ArrayBuffer`
- * and returns the full event stream.
- *
- * @param url The endpoint URL.
- * @param options HTTP options.
- *
- * @return An `Observable` of all `HttpEvent`s for the request,
- * with the response body as an `ArrayBuffer`.
- */
- options(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'events';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'arraybuffer';
- withCredentials?: boolean;
- }): Observable<HttpEvent<ArrayBuffer>>;
- /**
- * Constructs an `OPTIONS` request that interprets the body as a `Blob` and
- * returns the full event stream.
- *
- * @param url The endpoint URL.
- * @param options HTTP options.
- *
- * @return An `Observable` of all `HttpEvent`s for the request,
- * with the response body as a `Blob`.
- */
- options(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'events';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'blob';
- withCredentials?: boolean;
- }): Observable<HttpEvent<Blob>>;
- /**
- * Constructs an `OPTIONS` request that interprets the body as a text string
- * and returns the full event stream.
- *
- * @param url The endpoint URL.
- * @param options HTTP options.
- *
- * @return An `Observable` of all the `HttpEvent`s for the request,
- * with the response body of type string.
- */
- options(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'events';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'text';
- withCredentials?: boolean;
- }): Observable<HttpEvent<string>>;
- /**
- * Constructs an `OPTIONS` request that interprets the body as JSON
- * and returns the full event stream.
- *
- * @param url The endpoint URL.
- * @param options HTTP options.
- *
- * @return An `Observable` of all the `HttpEvent`s for the request with the response
- * body of type `Object`.
- */
- options(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'events';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType?: 'json';
- withCredentials?: boolean;
- }): Observable<HttpEvent<Object>>;
- /**
- * Constructs an `OPTIONS` request that interprets the body as JSON and
- * returns the full event stream.
- *
- * @param url The endpoint URL.
- * @param options HTTP options.
- *
- * @return An `Observable` of all the `HttpEvent`s for the request,
- * with a response body in the requested type.
- */
- options<T>(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'events';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType?: 'json';
- withCredentials?: boolean;
- }): Observable<HttpEvent<T>>;
- /**
- * Constructs an `OPTIONS` request that interprets the body as an `ArrayBuffer`
- * and returns the full HTTP response.
- *
- * @param url The endpoint URL.
- * @param options HTTP options.
- *
- * @return An `Observable` of the `HttpResponse` for the request,
- * with the response body as an `ArrayBuffer`.
- */
- options(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'response';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'arraybuffer';
- withCredentials?: boolean;
- }): Observable<HttpResponse<ArrayBuffer>>;
- /**
- * Constructs an `OPTIONS` request that interprets the body as a `Blob`
- * and returns the full `HttpResponse`.
- *
- * @param url The endpoint URL.
- * @param options HTTP options.
- *
- * @return An `Observable` of the `HttpResponse` for the request,
- * with the response body as a `Blob`.
- */
- options(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'response';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'blob';
- withCredentials?: boolean;
- }): Observable<HttpResponse<Blob>>;
- /**
- * Constructs an `OPTIONS` request that interprets the body as text stream
- * and returns the full `HttpResponse`.
- *
- * @param url The endpoint URL.
- * @param options HTTP options.
- *
- * @return An `Observable` of the `HttpResponse` for the request,
- * with the response body of type string.
- */
- options(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'response';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'text';
- withCredentials?: boolean;
- }): Observable<HttpResponse<string>>;
- /**
- * Constructs an `OPTIONS` request that interprets the body as JSON
- * and returns the full `HttpResponse`.
- *
- * @param url The endpoint URL.
- * @param options HTTP options.
- *
- * @return An `Observable` of the `HttpResponse` for the request,
- * with the response body of type `Object`.
- */
- options(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'response';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType?: 'json';
- withCredentials?: boolean;
- }): Observable<HttpResponse<Object>>;
- /**
- * Constructs an `OPTIONS` request that interprets the body as JSON and
- * returns the full `HttpResponse`.
- *
- * @param url The endpoint URL.
- * @param options HTTP options.
- *
- * @return An `Observable` of the `HttpResponse` for the request,
- * with a response body in the requested type.
- */
- options<T>(url: string, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'response';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType?: 'json';
- withCredentials?: boolean;
- }): Observable<HttpResponse<T>>;
- /**
- * Constructs an `OPTIONS` request that interprets the body as JSON and returns the
- * response body as an object parsed from JSON.
- *
- * @param url The endpoint URL.
- * @param options HTTP options.
- *
- * @return An `Observable` of the response, with the response body as an object parsed from JSON.
- */
- options(url: string, options?: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- observe?: 'body';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType?: 'json';
- withCredentials?: boolean;
- }): Observable<Object>;
- /**
- * Constructs an `OPTIONS` request that interprets the body as JSON and returns the
- * response in a given type.
- *
- * @param url The endpoint URL.
- * @param options HTTP options.
- *
- * @return An `Observable` of the `HttpResponse`, with a response body of the given type.
- */
- options<T>(url: string, options?: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- observe?: 'body';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType?: 'json';
- withCredentials?: boolean;
- }): Observable<T>;
- /**
- * Constructs a `PATCH` request that interprets the body as an `ArrayBuffer` and returns
- * the response as an `ArrayBuffer`.
- *
- * @param url The endpoint URL.
- * @param body The resources to edit.
- * @param options HTTP options.
- *
- * @return An `Observable` of the response, with the response body as an `ArrayBuffer`.
- */
- patch(url: string, body: any | null, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- observe?: 'body';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'arraybuffer';
- withCredentials?: boolean;
- }): Observable<ArrayBuffer>;
- /**
- * Constructs a `PATCH` request that interprets the body as a `Blob` and returns the response
- * as a `Blob`.
- *
- * @param url The endpoint URL.
- * @param body The resources to edit.
- * @param options HTTP options.
- *
- * @return An `Observable` of the response, with the response body as a `Blob`.
- */
- patch(url: string, body: any | null, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- observe?: 'body';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'blob';
- withCredentials?: boolean;
- }): Observable<Blob>;
- /**
- * Constructs a `PATCH` request that interprets the body as a text string and
- * returns the response as a string value.
- *
- * @param url The endpoint URL.
- * @param body The resources to edit.
- * @param options HTTP options.
- *
- * @return An `Observable` of the response, with a response body of type string.
- */
- patch(url: string, body: any | null, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- observe?: 'body';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'text';
- withCredentials?: boolean;
- }): Observable<string>;
- /**
- * Constructs a `PATCH` request that interprets the body as an `ArrayBuffer` and
- * returns the full event stream.
- *
- * @param url The endpoint URL.
- * @param body The resources to edit.
- * @param options HTTP options.
- *
- * @return An `Observable` of all the `HttpEvent`s for the request,
- * with the response body as an `ArrayBuffer`.
- */
- patch(url: string, body: any | null, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'events';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'arraybuffer';
- withCredentials?: boolean;
- }): Observable<HttpEvent<ArrayBuffer>>;
- /**
- * Constructs a `PATCH` request that interprets the body as a `Blob`
- * and returns the full event stream.
- *
- * @param url The endpoint URL.
- * @param body The resources to edit.
- * @param options HTTP options.
- *
- * @return An `Observable` of all the `HttpEvent`s for the request, with the
- * response body as `Blob`.
- */
- patch(url: string, body: any | null, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'events';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'blob';
- withCredentials?: boolean;
- }): Observable<HttpEvent<Blob>>;
- /**
- * Constructs a `PATCH` request that interprets the body as a text string and
- * returns the full event stream.
- *
- * @param url The endpoint URL.
- * @param body The resources to edit.
- * @param options HTTP options.
- *
- * @return An `Observable` of all the `HttpEvent`s for the request, with a
- * response body of type string.
- */
- patch(url: string, body: any | null, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'events';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'text';
- withCredentials?: boolean;
- }): Observable<HttpEvent<string>>;
- /**
- * Constructs a `PATCH` request that interprets the body as JSON
- * and returns the full event stream.
- *
- * @param url The endpoint URL.
- * @param body The resources to edit.
- * @param options HTTP options.
- *
- * @return An `Observable` of all the `HttpEvent`s for the request,
- * with a response body of type `Object`.
- */
- patch(url: string, body: any | null, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'events';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType?: 'json';
- withCredentials?: boolean;
- }): Observable<HttpEvent<Object>>;
- /**
- * Constructs a `PATCH` request that interprets the body as JSON
- * and returns the full event stream.
- *
- * @param url The endpoint URL.
- * @param body The resources to edit.
- * @param options HTTP options.
- *
- * @return An `Observable` of all the `HttpEvent`s for the request,
- * with a response body in the requested type.
- */
- patch<T>(url: string, body: any | null, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'events';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType?: 'json';
- withCredentials?: boolean;
- }): Observable<HttpEvent<T>>;
- /**
- * Constructs a `PATCH` request that interprets the body as an `ArrayBuffer`
- * and returns the full `HttpResponse`.
- *
- * @param url The endpoint URL.
- * @param body The resources to edit.
- * @param options HTTP options.
- *
- * @return An `Observable` of the `HttpResponse` for the request,
- * with the response body as an `ArrayBuffer`.
- */
- patch(url: string, body: any | null, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'response';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'arraybuffer';
- withCredentials?: boolean;
- }): Observable<HttpResponse<ArrayBuffer>>;
- /**
- * Constructs a `PATCH` request that interprets the body as a `Blob` and returns the full
- * `HttpResponse`.
- *
- * @param url The endpoint URL.
- * @param body The resources to edit.
- * @param options HTTP options.
- *
- * @return An `Observable` of the `HttpResponse` for the request,
- * with the response body as a `Blob`.
- */
- patch(url: string, body: any | null, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'response';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'blob';
- withCredentials?: boolean;
- }): Observable<HttpResponse<Blob>>;
- /**
- * Constructs a `PATCH` request that interprets the body as a text stream and returns the
- * full `HttpResponse`.
- *
- * @param url The endpoint URL.
- * @param body The resources to edit.
- * @param options HTTP options.
- *
- * @return An `Observable` of the `HttpResponse` for the request,
- * with a response body of type string.
- */
- patch(url: string, body: any | null, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'response';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'text';
- withCredentials?: boolean;
- }): Observable<HttpResponse<string>>;
- /**
- * Constructs a `PATCH` request that interprets the body as JSON
- * and returns the full `HttpResponse`.
- *
- * @param url The endpoint URL.
- * @param body The resources to edit.
- * @param options HTTP options.
- *
- * @return An `Observable` of the `HttpResponse` for the request,
- * with a response body in the requested type.
- */
- patch(url: string, body: any | null, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'response';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType?: 'json';
- withCredentials?: boolean;
- }): Observable<HttpResponse<Object>>;
- /**
- * Constructs a `PATCH` request that interprets the body as JSON
- * and returns the full `HttpResponse`.
- *
- * @param url The endpoint URL.
- * @param body The resources to edit.
- * @param options HTTP options.
- *
- * @return An `Observable` of the `HttpResponse` for the request,
- * with a response body in the given type.
- */
- patch<T>(url: string, body: any | null, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'response';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType?: 'json';
- withCredentials?: boolean;
- }): Observable<HttpResponse<T>>;
- /**
- * Constructs a `PATCH` request that interprets the body as JSON and
- * returns the response body as an object parsed from JSON.
- *
- * @param url The endpoint URL.
- * @param body The resources to edit.
- * @param options HTTP options.
- *
- * @return An `Observable` of the response, with the response body as an object parsed from JSON.
- */
- patch(url: string, body: any | null, options?: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- observe?: 'body';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType?: 'json';
- withCredentials?: boolean;
- }): Observable<Object>;
- /**
- * Constructs a `PATCH` request that interprets the body as JSON
- * and returns the response in a given type.
- *
- * @param url The endpoint URL.
- * @param body The resources to edit.
- * @param options HTTP options.
- *
- * @return An `Observable` of the `HttpResponse` for the request,
- * with a response body in the given type.
- */
- patch<T>(url: string, body: any | null, options?: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- observe?: 'body';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType?: 'json';
- withCredentials?: boolean;
- }): Observable<T>;
- /**
- * Constructs a `POST` request that interprets the body as an `ArrayBuffer` and returns
- * an `ArrayBuffer`.
- *
- * @param url The endpoint URL.
- * @param body The content to replace with.
- * @param options HTTP options.
- *
- * @return An `Observable` of the response, with the response body as an `ArrayBuffer`.
- */
- post(url: string, body: any | null, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- observe?: 'body';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'arraybuffer';
- withCredentials?: boolean;
- }): Observable<ArrayBuffer>;
- /**
- * Constructs a `POST` request that interprets the body as a `Blob` and returns the
- * response as a `Blob`.
- *
- * @param url The endpoint URL.
- * @param body The content to replace with.
- * @param options HTTP options
- *
- * @return An `Observable` of the response, with the response body as a `Blob`.
- */
- post(url: string, body: any | null, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- observe?: 'body';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'blob';
- withCredentials?: boolean;
- }): Observable<Blob>;
- /**
- * Constructs a `POST` request that interprets the body as a text string and
- * returns the response as a string value.
- *
- * @param url The endpoint URL.
- * @param body The content to replace with.
- * @param options HTTP options
- *
- * @return An `Observable` of the response, with a response body of type string.
- */
- post(url: string, body: any | null, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- observe?: 'body';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'text';
- withCredentials?: boolean;
- }): Observable<string>;
- /**
- * Constructs a `POST` request that interprets the body as an `ArrayBuffer` and
- * returns the full event stream.
- *
- * @param url The endpoint URL.
- * @param body The content to replace with.
- * @param options HTTP options
- *
- * @return An `Observable` of all `HttpEvent`s for the request,
- * with the response body as an `ArrayBuffer`.
- */
- post(url: string, body: any | null, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'events';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'arraybuffer';
- withCredentials?: boolean;
- }): Observable<HttpEvent<ArrayBuffer>>;
- /**
- * Constructs a `POST` request that interprets the body as a `Blob`
- * and returns the response in an observable of the full event stream.
- *
- * @param url The endpoint URL.
- * @param body The content to replace with.
- * @param options HTTP options
- *
- * @return An `Observable` of all `HttpEvent`s for the request, with the response body as `Blob`.
- */
- post(url: string, body: any | null, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'events';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'blob';
- withCredentials?: boolean;
- }): Observable<HttpEvent<Blob>>;
- /**
- * Constructs a `POST` request that interprets the body as a text string and returns the full
- * event stream.
- *
- * @param url The endpoint URL.
- * @param body The content to replace with.
- * @param options HTTP options
- *
- * @return An `Observable` of all `HttpEvent`s for the request,
- * with a response body of type string.
- */
- post(url: string, body: any | null, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'events';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'text';
- withCredentials?: boolean;
- }): Observable<HttpEvent<string>>;
- /**
- * Constructs a POST request that interprets the body as JSON and returns the full
- * event stream.
- *
- * @param url The endpoint URL.
- * @param body The content to replace with.
- * @param options HTTP options
- *
- * @return An `Observable` of all `HttpEvent`s for the request,
- * with a response body of type `Object`.
- */
- post(url: string, body: any | null, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'events';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType?: 'json';
- withCredentials?: boolean;
- }): Observable<HttpEvent<Object>>;
- /**
- * Constructs a POST request that interprets the body as JSON and returns the full
- * event stream.
- *
- * @param url The endpoint URL.
- * @param body The content to replace with.
- * @param options HTTP options
- *
- * @return An `Observable` of all `HttpEvent`s for the request,
- * with a response body in the requested type.
- */
- post<T>(url: string, body: any | null, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'events';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType?: 'json';
- withCredentials?: boolean;
- }): Observable<HttpEvent<T>>;
- /**
- * Constructs a POST request that interprets the body as an `ArrayBuffer`
- * and returns the full `HttpResponse`.
- *
- * @param url The endpoint URL.
- * @param body The content to replace with.
- * @param options HTTP options
- *
- * @return An `Observable` of the `HttpResponse` for the request, with the response body as an
- * `ArrayBuffer`.
- */
- post(url: string, body: any | null, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'response';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'arraybuffer';
- withCredentials?: boolean;
- }): Observable<HttpResponse<ArrayBuffer>>;
- /**
- * Constructs a `POST` request that interprets the body as a `Blob` and returns the full
- * `HttpResponse`.
- *
- * @param url The endpoint URL.
- * @param body The content to replace with.
- * @param options HTTP options
- *
- * @return An `Observable` of the `HttpResponse` for the request,
- * with the response body as a `Blob`.
- */
- post(url: string, body: any | null, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'response';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'blob';
- withCredentials?: boolean;
- }): Observable<HttpResponse<Blob>>;
- /**
- * Constructs a `POST` request that interprets the body as a text stream and returns
- * the full `HttpResponse`.
- *
- * @param url The endpoint URL.
- * @param body The content to replace with.
- * @param options HTTP options
- *
- * @return An `Observable` of the `HttpResponse` for the request,
- * with a response body of type string.
- */
- post(url: string, body: any | null, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'response';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'text';
- withCredentials?: boolean;
- }): Observable<HttpResponse<string>>;
- /**
- * Constructs a `POST` request that interprets the body as JSON
- * and returns the full `HttpResponse`.
- *
- * @param url The endpoint URL.
- * @param body The content to replace with.
- * @param options HTTP options
- *
- * @return An `Observable` of the `HttpResponse` for the request, with a response body of type
- * `Object`.
- */
- post(url: string, body: any | null, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'response';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType?: 'json';
- withCredentials?: boolean;
- }): Observable<HttpResponse<Object>>;
- /**
- * Constructs a `POST` request that interprets the body as JSON and returns the
- * full `HttpResponse`.
- *
- *
- * @param url The endpoint URL.
- * @param body The content to replace with.
- * @param options HTTP options
- *
- * @return An `Observable` of the `HttpResponse` for the request, with a response body in the
- * requested type.
- */
- post<T>(url: string, body: any | null, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'response';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType?: 'json';
- withCredentials?: boolean;
- }): Observable<HttpResponse<T>>;
- /**
- * Constructs a `POST` request that interprets the body as JSON
- * and returns the response body as an object parsed from JSON.
- *
- * @param url The endpoint URL.
- * @param body The content to replace with.
- * @param options HTTP options
- *
- * @return An `Observable` of the response, with the response body as an object parsed from JSON.
- */
- post(url: string, body: any | null, options?: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- observe?: 'body';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType?: 'json';
- withCredentials?: boolean;
- }): Observable<Object>;
- /**
- * Constructs a `POST` request that interprets the body as JSON
- * and returns an observable of the response.
- *
- * @param url The endpoint URL.
- * @param body The content to replace with.
- * @param options HTTP options
- *
- * @return An `Observable` of the `HttpResponse` for the request, with a response body in the
- * requested type.
- */
- post<T>(url: string, body: any | null, options?: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- observe?: 'body';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType?: 'json';
- withCredentials?: boolean;
- }): Observable<T>;
- /**
- * Constructs a `PUT` request that interprets the body as an `ArrayBuffer` and returns the
- * response as an `ArrayBuffer`.
- *
- * @param url The endpoint URL.
- * @param body The resources to add/update.
- * @param options HTTP options
- *
- * @return An `Observable` of the response, with the response body as an `ArrayBuffer`.
- */
- put(url: string, body: any | null, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- observe?: 'body';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'arraybuffer';
- withCredentials?: boolean;
- }): Observable<ArrayBuffer>;
- /**
- * Constructs a `PUT` request that interprets the body as a `Blob` and returns
- * the response as a `Blob`.
- *
- * @param url The endpoint URL.
- * @param body The resources to add/update.
- * @param options HTTP options
- *
- * @return An `Observable` of the response, with the response body as a `Blob`.
- */
- put(url: string, body: any | null, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- observe?: 'body';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'blob';
- withCredentials?: boolean;
- }): Observable<Blob>;
- /**
- * Constructs a `PUT` request that interprets the body as a text string and
- * returns the response as a string value.
- *
- * @param url The endpoint URL.
- * @param body The resources to add/update.
- * @param options HTTP options
- *
- * @return An `Observable` of the response, with a response body of type string.
- */
- put(url: string, body: any | null, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- observe?: 'body';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'text';
- withCredentials?: boolean;
- }): Observable<string>;
- /**
- * Constructs a `PUT` request that interprets the body as an `ArrayBuffer` and
- * returns the full event stream.
- *
- * @param url The endpoint URL.
- * @param body The resources to add/update.
- * @param options HTTP options
- *
- * @return An `Observable` of all `HttpEvent`s for the request,
- * with the response body as an `ArrayBuffer`.
- */
- put(url: string, body: any | null, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'events';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'arraybuffer';
- withCredentials?: boolean;
- }): Observable<HttpEvent<ArrayBuffer>>;
- /**
- * Constructs a `PUT` request that interprets the body as a `Blob` and returns the full event
- * stream.
- *
- * @param url The endpoint URL.
- * @param body The resources to add/update.
- * @param options HTTP options
- *
- * @return An `Observable` of all `HttpEvent`s for the request,
- * with the response body as a `Blob`.
- */
- put(url: string, body: any | null, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'events';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'blob';
- withCredentials?: boolean;
- }): Observable<HttpEvent<Blob>>;
- /**
- * Constructs a `PUT` request that interprets the body as a text string and returns the full event
- * stream.
- *
- * @param url The endpoint URL.
- * @param body The resources to add/update.
- * @param options HTTP options
- *
- * @return An `Observable` of all `HttpEvent`s for the request, with a response body
- * of type string.
- */
- put(url: string, body: any | null, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'events';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'text';
- withCredentials?: boolean;
- }): Observable<HttpEvent<string>>;
- /**
- * Constructs a `PUT` request that interprets the body as JSON and returns the full
- * event stream.
- *
- * @param url The endpoint URL.
- * @param body The resources to add/update.
- * @param options HTTP options
- *
- * @return An `Observable` of all `HttpEvent`s for the request, with a response body of
- * type `Object`.
- */
- put(url: string, body: any | null, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'events';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType?: 'json';
- withCredentials?: boolean;
- }): Observable<HttpEvent<Object>>;
- /**
- * Constructs a `PUT` request that interprets the body as JSON and returns the
- * full event stream.
- *
- * @param url The endpoint URL.
- * @param body The resources to add/update.
- * @param options HTTP options
- *
- * @return An `Observable` of all `HttpEvent`s for the request,
- * with a response body in the requested type.
- */
- put<T>(url: string, body: any | null, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'events';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType?: 'json';
- withCredentials?: boolean;
- }): Observable<HttpEvent<T>>;
- /**
- * Constructs a `PUT` request that interprets the body as an
- * `ArrayBuffer` and returns an observable of the full HTTP response.
- *
- * @param url The endpoint URL.
- * @param body The resources to add/update.
- * @param options HTTP options
- *
- * @return An `Observable` of the `HttpResponse` for the request, with the response body as an
- * `ArrayBuffer`.
- */
- put(url: string, body: any | null, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'response';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'arraybuffer';
- withCredentials?: boolean;
- }): Observable<HttpResponse<ArrayBuffer>>;
- /**
- * Constructs a `PUT` request that interprets the body as a `Blob` and returns the
- * full HTTP response.
- *
- * @param url The endpoint URL.
- * @param body The resources to add/update.
- * @param options HTTP options
- *
- * @return An `Observable` of the `HttpResponse` for the request,
- * with the response body as a `Blob`.
- */
- put(url: string, body: any | null, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'response';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'blob';
- withCredentials?: boolean;
- }): Observable<HttpResponse<Blob>>;
- /**
- * Constructs a `PUT` request that interprets the body as a text stream and returns the
- * full HTTP response.
- *
- * @param url The endpoint URL.
- * @param body The resources to add/update.
- * @param options HTTP options
- *
- * @return An `Observable` of the `HttpResponse` for the request, with a response body of type
- * string.
- */
- put(url: string, body: any | null, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'response';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType: 'text';
- withCredentials?: boolean;
- }): Observable<HttpResponse<string>>;
- /**
- * Constructs a `PUT` request that interprets the body as JSON and returns the full
- * HTTP response.
- *
- * @param url The endpoint URL.
- * @param body The resources to add/update.
- * @param options HTTP options
- *
- * @return An `Observable` of the `HttpResponse` for the request, with a response body
- * of type 'Object`.
- */
- put(url: string, body: any | null, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'response';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType?: 'json';
- withCredentials?: boolean;
- }): Observable<HttpResponse<Object>>;
- /**
- * Constructs a `PUT` request that interprets the body as an instance of the requested type and
- * returns the full HTTP response.
- *
- * @param url The endpoint URL.
- * @param body The resources to add/update.
- * @param options HTTP options
- *
- * @return An `Observable` of the `HttpResponse` for the request,
- * with a response body in the requested type.
- */
- put<T>(url: string, body: any | null, options: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- observe: 'response';
- context?: HttpContext;
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType?: 'json';
- withCredentials?: boolean;
- }): Observable<HttpResponse<T>>;
- /**
- * Constructs a `PUT` request that interprets the body as JSON
- * and returns an observable of JavaScript object.
- *
- * @param url The endpoint URL.
- * @param body The resources to add/update.
- * @param options HTTP options
- *
- * @return An `Observable` of the response as a JavaScript object.
- */
- put(url: string, body: any | null, options?: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- observe?: 'body';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType?: 'json';
- withCredentials?: boolean;
- }): Observable<Object>;
- /**
- * Constructs a `PUT` request that interprets the body as an instance of the requested type
- * and returns an observable of the requested type.
- *
- * @param url The endpoint URL.
- * @param body The resources to add/update.
- * @param options HTTP options
- *
- * @return An `Observable` of the requested type.
- */
- put<T>(url: string, body: any | null, options?: {
- headers?: HttpHeaders | {
- [header: string]: string | string[];
- };
- context?: HttpContext;
- observe?: 'body';
- params?: HttpParams | {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- reportProgress?: boolean;
- responseType?: 'json';
- withCredentials?: boolean;
- }): Observable<T>;
- static ɵfac: i0.ɵɵFactoryDeclaration<HttpClient, never>;
- static ɵprov: i0.ɵɵInjectableDeclaration<HttpClient>;
- }
- /**
- * Configures the [dependency injector](guide/glossary#injector) for `HttpClient`
- * with supporting services for JSONP.
- * Without this module, Jsonp requests reach the backend
- * with method JSONP, where they are rejected.
- *
- * @publicApi
- */
- export declare class HttpClientJsonpModule {
- static ɵfac: i0.ɵɵFactoryDeclaration<HttpClientJsonpModule, never>;
- static ɵmod: i0.ɵɵNgModuleDeclaration<HttpClientJsonpModule, never, never, never>;
- static ɵinj: i0.ɵɵInjectorDeclaration<HttpClientJsonpModule>;
- }
- /**
- * Configures the [dependency injector](guide/glossary#injector) for `HttpClient`
- * with supporting services for XSRF. Automatically imported by `HttpClientModule`.
- *
- * You can add interceptors to the chain behind `HttpClient` by binding them to the
- * multiprovider for built-in [DI token](guide/glossary#di-token) `HTTP_INTERCEPTORS`.
- *
- * @publicApi
- */
- export declare class HttpClientModule {
- static ɵfac: i0.ɵɵFactoryDeclaration<HttpClientModule, never>;
- static ɵmod: i0.ɵɵNgModuleDeclaration<HttpClientModule, never, never, never>;
- static ɵinj: i0.ɵɵInjectorDeclaration<HttpClientModule>;
- }
- /**
- * Configures XSRF protection support for outgoing requests.
- *
- * For a server that supports a cookie-based XSRF protection system,
- * use directly to configure XSRF protection with the correct
- * cookie and header names.
- *
- * If no names are supplied, the default cookie name is `XSRF-TOKEN`
- * and the default header name is `X-XSRF-TOKEN`.
- *
- * @publicApi
- */
- export declare class HttpClientXsrfModule {
- /**
- * Disable the default XSRF protection.
- */
- static disable(): ModuleWithProviders<HttpClientXsrfModule>;
- /**
- * Configure XSRF protection.
- * @param options An object that can specify either or both
- * cookie name or header name.
- * - Cookie name default is `XSRF-TOKEN`.
- * - Header name default is `X-XSRF-TOKEN`.
- *
- */
- static withOptions(options?: {
- cookieName?: string;
- headerName?: string;
- }): ModuleWithProviders<HttpClientXsrfModule>;
- static ɵfac: i0.ɵɵFactoryDeclaration<HttpClientXsrfModule, never>;
- static ɵmod: i0.ɵɵNgModuleDeclaration<HttpClientXsrfModule, never, never, never>;
- static ɵinj: i0.ɵɵInjectorDeclaration<HttpClientXsrfModule>;
- }
- /**
- * Http context stores arbitrary user defined values and ensures type safety without
- * actually knowing the types. It is backed by a `Map` and guarantees that keys do not clash.
- *
- * This context is mutable and is shared between cloned requests unless explicitly specified.
- *
- * @usageNotes
- *
- * ### Usage Example
- *
- * ```typescript
- * // inside cache.interceptors.ts
- * export const IS_CACHE_ENABLED = new HttpContextToken<boolean>(() => false);
- *
- * export class CacheInterceptor implements HttpInterceptor {
- *
- * intercept(req: HttpRequest<any>, delegate: HttpHandler): Observable<HttpEvent<any>> {
- * if (req.context.get(IS_CACHE_ENABLED) === true) {
- * return ...;
- * }
- * return delegate.handle(req);
- * }
- * }
- *
- * // inside a service
- *
- * this.httpClient.get('/api/weather', {
- * context: new HttpContext().set(IS_CACHE_ENABLED, true)
- * }).subscribe(...);
- * ```
- *
- * @publicApi
- */
- export declare class HttpContext {
- private readonly map;
- /**
- * Store a value in the context. If a value is already present it will be overwritten.
- *
- * @param token The reference to an instance of `HttpContextToken`.
- * @param value The value to store.
- *
- * @returns A reference to itself for easy chaining.
- */
- set<T>(token: HttpContextToken<T>, value: T): HttpContext;
- /**
- * Retrieve the value associated with the given token.
- *
- * @param token The reference to an instance of `HttpContextToken`.
- *
- * @returns The stored value or default if one is defined.
- */
- get<T>(token: HttpContextToken<T>): T;
- /**
- * Delete the value associated with the given token.
- *
- * @param token The reference to an instance of `HttpContextToken`.
- *
- * @returns A reference to itself for easy chaining.
- */
- delete(token: HttpContextToken<unknown>): HttpContext;
- /**
- * Checks for existence of a given token.
- *
- * @param token The reference to an instance of `HttpContextToken`.
- *
- * @returns True if the token exists, false otherwise.
- */
- has(token: HttpContextToken<unknown>): boolean;
- /**
- * @returns a list of tokens currently stored in the context.
- */
- keys(): IterableIterator<HttpContextToken<unknown>>;
- }
- /**
- * A token used to manipulate and access values stored in `HttpContext`.
- *
- * @publicApi
- */
- export declare class HttpContextToken<T> {
- readonly defaultValue: () => T;
- constructor(defaultValue: () => T);
- }
- /**
- * A download progress event.
- *
- * @publicApi
- */
- export declare interface HttpDownloadProgressEvent extends HttpProgressEvent {
- type: HttpEventType.DownloadProgress;
- /**
- * The partial response body as downloaded so far.
- *
- * Only present if the responseType was `text`.
- */
- partialText?: string;
- }
- /**
- * A response that represents an error or failure, either from a
- * non-successful HTTP status, an error while executing the request,
- * or some other failure which occurred during the parsing of the response.
- *
- * Any error returned on the `Observable` response stream will be
- * wrapped in an `HttpErrorResponse` to provide additional context about
- * the state of the HTTP layer when the error occurred. The error property
- * will contain either a wrapped Error object or the error response returned
- * from the server.
- *
- * @publicApi
- */
- export declare class HttpErrorResponse extends HttpResponseBase implements Error {
- readonly name = "HttpErrorResponse";
- readonly message: string;
- readonly error: any | null;
- /**
- * Errors are never okay, even when the status code is in the 2xx success range.
- */
- readonly ok = false;
- constructor(init: {
- error?: any;
- headers?: HttpHeaders;
- status?: number;
- statusText?: string;
- url?: string;
- });
- }
- /**
- * Union type for all possible events on the response stream.
- *
- * Typed according to the expected type of the response.
- *
- * @publicApi
- */
- export declare type HttpEvent<T> = HttpSentEvent | HttpHeaderResponse | HttpResponse<T> | HttpProgressEvent | HttpUserEvent<T>;
- /**
- * Type enumeration for the different kinds of `HttpEvent`.
- *
- * @publicApi
- */
- export declare enum HttpEventType {
- /**
- * The request was sent out over the wire.
- */
- Sent = 0,
- /**
- * An upload progress event was received.
- *
- * Note: The `FetchBackend` doesn't support progress report on uploads.
- */
- UploadProgress = 1,
- /**
- * The response status code and headers were received.
- */
- ResponseHeader = 2,
- /**
- * A download progress event was received.
- */
- DownloadProgress = 3,
- /**
- * The full response including the body was received.
- */
- Response = 4,
- /**
- * A custom event from an interceptor or a backend.
- */
- User = 5
- }
- /**
- * A feature for use when configuring `provideHttpClient`.
- *
- * @publicApi
- */
- export declare interface HttpFeature<KindT extends HttpFeatureKind> {
- ɵkind: KindT;
- ɵproviders: Provider[];
- }
- /**
- * Identifies a particular kind of `HttpFeature`.
- *
- * @publicApi
- */
- export declare enum HttpFeatureKind {
- Interceptors = 0,
- LegacyInterceptors = 1,
- CustomXsrfConfiguration = 2,
- NoXsrfProtection = 3,
- JsonpSupport = 4,
- RequestsMadeViaParent = 5,
- Fetch = 6
- }
- /**
- * Transforms an `HttpRequest` into a stream of `HttpEvent`s, one of which will likely be a
- * `HttpResponse`.
- *
- * `HttpHandler` is injectable. When injected, the handler instance dispatches requests to the
- * first interceptor in the chain, which dispatches to the second, etc, eventually reaching the
- * `HttpBackend`.
- *
- * In an `HttpInterceptor`, the `HttpHandler` parameter is the next interceptor in the chain.
- *
- * @publicApi
- */
- export declare abstract class HttpHandler {
- abstract handle(req: HttpRequest<any>): Observable<HttpEvent<any>>;
- }
- /**
- * Represents the next interceptor in an interceptor chain, or the real backend if there are no
- * further interceptors.
- *
- * Most interceptors will delegate to this function, and either modify the outgoing request or the
- * response when it arrives. Within the scope of the current request, however, this function may be
- * called any number of times, for any number of downstream requests. Such downstream requests need
- * not be to the same URL or even the same origin as the current request. It is also valid to not
- * call the downstream handler at all, and process the current request entirely within the
- * interceptor.
- *
- * This function should only be called within the scope of the request that's currently being
- * intercepted. Once that request is complete, this downstream handler function should not be
- * called.
- *
- * @publicApi
- *
- * @see [HTTP Guide](guide/http-intercept-requests-and-responses)
- */
- export declare type HttpHandlerFn = (req: HttpRequest<unknown>) => Observable<HttpEvent<unknown>>;
- /**
- * A partial HTTP response which only includes the status and header data,
- * but no response body.
- *
- * `HttpHeaderResponse` is a `HttpEvent` available on the response
- * event stream, only when progress events are requested.
- *
- * @publicApi
- */
- export declare class HttpHeaderResponse extends HttpResponseBase {
- /**
- * Create a new `HttpHeaderResponse` with the given parameters.
- */
- constructor(init?: {
- headers?: HttpHeaders;
- status?: number;
- statusText?: string;
- url?: string;
- });
- readonly type: HttpEventType.ResponseHeader;
- /**
- * Copy this `HttpHeaderResponse`, overriding its contents with the
- * given parameter hash.
- */
- clone(update?: {
- headers?: HttpHeaders;
- status?: number;
- statusText?: string;
- url?: string;
- }): HttpHeaderResponse;
- }
- /**
- * Represents the header configuration options for an HTTP request.
- * Instances are immutable. Modifying methods return a cloned
- * instance with the change. The original object is never changed.
- *
- * @publicApi
- */
- export declare class HttpHeaders {
- /**
- * Internal map of lowercase header names to values.
- */
- private headers;
- /**
- * Internal map of lowercased header names to the normalized
- * form of the name (the form seen first).
- */
- private normalizedNames;
- /**
- * Complete the lazy initialization of this object (needed before reading).
- */
- private lazyInit;
- /**
- * Queued updates to be materialized the next initialization.
- */
- private lazyUpdate;
- /** Constructs a new HTTP header object with the given values.*/
- constructor(headers?: string | {
- [name: string]: string | number | (string | number)[];
- } | Headers);
- /**
- * Checks for existence of a given header.
- *
- * @param name The header name to check for existence.
- *
- * @returns True if the header exists, false otherwise.
- */
- has(name: string): boolean;
- /**
- * Retrieves the first value of a given header.
- *
- * @param name The header name.
- *
- * @returns The value string if the header exists, null otherwise
- */
- get(name: string): string | null;
- /**
- * Retrieves the names of the headers.
- *
- * @returns A list of header names.
- */
- keys(): string[];
- /**
- * Retrieves a list of values for a given header.
- *
- * @param name The header name from which to retrieve values.
- *
- * @returns A string of values if the header exists, null otherwise.
- */
- getAll(name: string): string[] | null;
- /**
- * Appends a new value to the existing set of values for a header
- * and returns them in a clone of the original instance.
- *
- * @param name The header name for which to append the values.
- * @param value The value to append.
- *
- * @returns A clone of the HTTP headers object with the value appended to the given header.
- */
- append(name: string, value: string | string[]): HttpHeaders;
- /**
- * Sets or modifies a value for a given header in a clone of the original instance.
- * If the header already exists, its value is replaced with the given value
- * in the returned object.
- *
- * @param name The header name.
- * @param value The value or values to set or override for the given header.
- *
- * @returns A clone of the HTTP headers object with the newly set header value.
- */
- set(name: string, value: string | string[]): HttpHeaders;
- /**
- * Deletes values for a given header in a clone of the original instance.
- *
- * @param name The header name.
- * @param value The value or values to delete for the given header.
- *
- * @returns A clone of the HTTP headers object with the given value deleted.
- */
- delete(name: string, value?: string | string[]): HttpHeaders;
- private maybeSetNormalizedName;
- private init;
- private copyFrom;
- private clone;
- private applyUpdate;
- private setHeaderEntries;
- }
- /**
- * Intercepts and handles an `HttpRequest` or `HttpResponse`.
- *
- * Most interceptors transform the outgoing request before passing it to the
- * next interceptor in the chain, by calling `next.handle(transformedReq)`.
- * An interceptor may transform the
- * response event stream as well, by applying additional RxJS operators on the stream
- * returned by `next.handle()`.
- *
- * More rarely, an interceptor may handle the request entirely,
- * and compose a new event stream instead of invoking `next.handle()`. This is an
- * acceptable behavior, but keep in mind that further interceptors will be skipped entirely.
- *
- * It is also rare but valid for an interceptor to return multiple responses on the
- * event stream for a single request.
- *
- * @publicApi
- *
- * @see [HTTP Guide](guide/http-intercept-requests-and-responses)
- * @see {@link HttpInterceptorFn}
- *
- * @usageNotes
- *
- * To use the same instance of `HttpInterceptors` for the entire app, import the `HttpClientModule`
- * only in your `AppModule`, and add the interceptors to the root application injector.
- * If you import `HttpClientModule` multiple times across different modules (for example, in lazy
- * loading modules), each import creates a new copy of the `HttpClientModule`, which overwrites the
- * interceptors provided in the root module.
- */
- export declare interface HttpInterceptor {
- /**
- * Identifies and handles a given HTTP request.
- * @param req The outgoing request object to handle.
- * @param next The next interceptor in the chain, or the backend
- * if no interceptors remain in the chain.
- * @returns An observable of the event stream.
- */
- intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
- }
- /**
- * An interceptor for HTTP requests made via `HttpClient`.
- *
- * `HttpInterceptorFn`s are middleware functions which `HttpClient` calls when a request is made.
- * These functions have the opportunity to modify the outgoing request or any response that comes
- * back, as well as block, redirect, or otherwise change the request or response semantics.
- *
- * An `HttpHandlerFn` representing the next interceptor (or the backend which will make a real HTTP
- * request) is provided. Most interceptors will delegate to this function, but that is not required
- * (see `HttpHandlerFn` for more details).
- *
- * `HttpInterceptorFn`s are executed in an [injection context](/guide/dependency-injection-context).
- * They have access to `inject()` via the `EnvironmentInjector` from which they were configured.
- *
- * @see [HTTP Guide](guide/http-intercept-requests-and-responses)
- * @see {@link withInterceptors}
- *
- * @usageNotes
- * Here is a noop interceptor that passes the request through without modifying it:
- * ```typescript
- * export const noopInterceptor: HttpInterceptorFn = (req: HttpRequest<unknown>, next:
- * HttpHandlerFn) => {
- * return next(modifiedReq);
- * };
- * ```
- *
- * If you want to alter a request, clone it first and modify the clone before passing it to the
- * `next()` handler function.
- *
- * Here is a basic interceptor that adds a bearer token to the headers
- * ```typescript
- * export const authenticationInterceptor: HttpInterceptorFn = (req: HttpRequest<unknown>, next:
- * HttpHandlerFn) => {
- * const userToken = 'MY_TOKEN'; const modifiedReq = req.clone({
- * headers: req.headers.set('Authorization', `Bearer ${userToken}`),
- * });
- *
- * return next(modifiedReq);
- * };
- * ```
- */
- export declare type HttpInterceptorFn = (req: HttpRequest<unknown>, next: HttpHandlerFn) => Observable<HttpEvent<unknown>>;
- declare class HttpInterceptorHandler extends HttpHandler {
- private backend;
- private injector;
- private chain;
- private readonly pendingTasks;
- constructor(backend: HttpBackend, injector: EnvironmentInjector);
- handle(initialRequest: HttpRequest<any>): Observable<HttpEvent<any>>;
- static ɵfac: i0.ɵɵFactoryDeclaration<HttpInterceptorHandler, never>;
- static ɵprov: i0.ɵɵInjectableDeclaration<HttpInterceptorHandler>;
- }
- export { HttpInterceptorHandler as ɵHttpInterceptingHandler }
- export { HttpInterceptorHandler as ɵHttpInterceptorHandler }
- /**
- * A codec for encoding and decoding parameters in URLs.
- *
- * Used by `HttpParams`.
- *
- * @publicApi
- **/
- export declare interface HttpParameterCodec {
- encodeKey(key: string): string;
- encodeValue(value: string): string;
- decodeKey(key: string): string;
- decodeValue(value: string): string;
- }
- /**
- * An HTTP request/response body that represents serialized parameters,
- * per the MIME type `application/x-www-form-urlencoded`.
- *
- * This class is immutable; all mutation operations return a new instance.
- *
- * @publicApi
- */
- export declare class HttpParams {
- private map;
- private encoder;
- private updates;
- private cloneFrom;
- constructor(options?: HttpParamsOptions);
- /**
- * Reports whether the body includes one or more values for a given parameter.
- * @param param The parameter name.
- * @returns True if the parameter has one or more values,
- * false if it has no value or is not present.
- */
- has(param: string): boolean;
- /**
- * Retrieves the first value for a parameter.
- * @param param The parameter name.
- * @returns The first value of the given parameter,
- * or `null` if the parameter is not present.
- */
- get(param: string): string | null;
- /**
- * Retrieves all values for a parameter.
- * @param param The parameter name.
- * @returns All values in a string array,
- * or `null` if the parameter not present.
- */
- getAll(param: string): string[] | null;
- /**
- * Retrieves all the parameters for this body.
- * @returns The parameter names in a string array.
- */
- keys(): string[];
- /**
- * Appends a new value to existing values for a parameter.
- * @param param The parameter name.
- * @param value The new value to add.
- * @return A new body with the appended value.
- */
- append(param: string, value: string | number | boolean): HttpParams;
- /**
- * Constructs a new body with appended values for the given parameter name.
- * @param params parameters and values
- * @return A new body with the new value.
- */
- appendAll(params: {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- }): HttpParams;
- /**
- * Replaces the value for a parameter.
- * @param param The parameter name.
- * @param value The new value.
- * @return A new body with the new value.
- */
- set(param: string, value: string | number | boolean): HttpParams;
- /**
- * Removes a given value or all values from a parameter.
- * @param param The parameter name.
- * @param value The value to remove, if provided.
- * @return A new body with the given value removed, or with all values
- * removed if no value is specified.
- */
- delete(param: string, value?: string | number | boolean): HttpParams;
- /**
- * Serializes the body to an encoded string, where key-value pairs (separated by `=`) are
- * separated by `&`s.
- */
- toString(): string;
- private clone;
- private init;
- }
- /**
- * Options used to construct an `HttpParams` instance.
- *
- * @publicApi
- */
- export declare interface HttpParamsOptions {
- /**
- * String representation of the HTTP parameters in URL-query-string format.
- * Mutually exclusive with `fromObject`.
- */
- fromString?: string;
- /** Object map of the HTTP parameters. Mutually exclusive with `fromString`. */
- fromObject?: {
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
- };
- /** Encoding codec used to parse and serialize the parameters. */
- encoder?: HttpParameterCodec;
- }
- /**
- * Base interface for progress events.
- *
- * @publicApi
- */
- export declare interface HttpProgressEvent {
- /**
- * Progress event type is either upload or download.
- */
- type: HttpEventType.DownloadProgress | HttpEventType.UploadProgress;
- /**
- * Number of bytes uploaded or downloaded.
- */
- loaded: number;
- /**
- * Total number of bytes to upload or download. Depending on the request or
- * response, this may not be computable and thus may not be present.
- */
- total?: number;
- }
- /**
- * An outgoing HTTP request with an optional typed body.
- *
- * `HttpRequest` represents an outgoing request, including URL, method,
- * headers, body, and other request configuration options. Instances should be
- * assumed to be immutable. To modify a `HttpRequest`, the `clone`
- * method should be used.
- *
- * @publicApi
- */
- export declare class HttpRequest<T> {
- readonly url: string;
- /**
- * The request body, or `null` if one isn't set.
- *
- * Bodies are not enforced to be immutable, as they can include a reference to any
- * user-defined data type. However, interceptors should take care to preserve
- * idempotence by treating them as such.
- */
- readonly body: T | null;
- /**
- * Outgoing headers for this request.
- */
- readonly headers: HttpHeaders;
- /**
- * Shared and mutable context that can be used by interceptors
- */
- readonly context: HttpContext;
- /**
- * Whether this request should be made in a way that exposes progress events.
- *
- * Progress events are expensive (change detection runs on each event) and so
- * they should only be requested if the consumer intends to monitor them.
- *
- * Note: The `FetchBackend` doesn't support progress report on uploads.
- */
- readonly reportProgress: boolean;
- /**
- * Whether this request should be sent with outgoing credentials (cookies).
- */
- readonly withCredentials: boolean;
- /**
- * The expected response type of the server.
- *
- * This is used to parse the response appropriately before returning it to
- * the requestee.
- */
- readonly responseType: 'arraybuffer' | 'blob' | 'json' | 'text';
- /**
- * The outgoing HTTP request method.
- */
- readonly method: string;
- /**
- * Outgoing URL parameters.
- *
- * To pass a string representation of HTTP parameters in the URL-query-string format,
- * the `HttpParamsOptions`' `fromString` may be used. For example:
- *
- * ```
- * new HttpParams({fromString: 'angular=awesome'})
- * ```
- */
- readonly params: HttpParams;
- /**
- * The outgoing URL with all URL parameters set.
- */
- readonly urlWithParams: string;
- constructor(method: 'DELETE' | 'GET' | 'HEAD' | 'JSONP' | 'OPTIONS', url: string, init?: {
- headers?: HttpHeaders;
- context?: HttpContext;
- reportProgress?: boolean;
- params?: HttpParams;
- responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
- withCredentials?: boolean;
- });
- constructor(method: 'POST' | 'PUT' | 'PATCH', url: string, body: T | null, init?: {
- headers?: HttpHeaders;
- context?: HttpContext;
- reportProgress?: boolean;
- params?: HttpParams;
- responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
- withCredentials?: boolean;
- });
- constructor(method: string, url: string, body: T | null, init?: {
- headers?: HttpHeaders;
- context?: HttpContext;
- reportProgress?: boolean;
- params?: HttpParams;
- responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
- withCredentials?: boolean;
- });
- /**
- * Transform the free-form body into a serialized format suitable for
- * transmission to the server.
- */
- serializeBody(): ArrayBuffer | Blob | FormData | URLSearchParams | string | null;
- /**
- * Examine the body and attempt to infer an appropriate MIME type
- * for it.
- *
- * If no such type can be inferred, this method will return `null`.
- */
- detectContentTypeHeader(): string | null;
- clone(): HttpRequest<T>;
- clone(update: {
- headers?: HttpHeaders;
- context?: HttpContext;
- reportProgress?: boolean;
- params?: HttpParams;
- responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
- withCredentials?: boolean;
- body?: T | null;
- method?: string;
- url?: string;
- setHeaders?: {
- [name: string]: string | string[];
- };
- setParams?: {
- [param: string]: string;
- };
- }): HttpRequest<T>;
- clone<V>(update: {
- headers?: HttpHeaders;
- context?: HttpContext;
- reportProgress?: boolean;
- params?: HttpParams;
- responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
- withCredentials?: boolean;
- body?: V | null;
- method?: string;
- url?: string;
- setHeaders?: {
- [name: string]: string | string[];
- };
- setParams?: {
- [param: string]: string;
- };
- }): HttpRequest<V>;
- }
- /**
- * A full HTTP response, including a typed response body (which may be `null`
- * if one was not returned).
- *
- * `HttpResponse` is a `HttpEvent` available on the response event
- * stream.
- *
- * @publicApi
- */
- export declare class HttpResponse<T> extends HttpResponseBase {
- /**
- * The response body, or `null` if one was not returned.
- */
- readonly body: T | null;
- /**
- * Construct a new `HttpResponse`.
- */
- constructor(init?: {
- body?: T | null;
- headers?: HttpHeaders;
- status?: number;
- statusText?: string;
- url?: string;
- });
- readonly type: HttpEventType.Response;
- clone(): HttpResponse<T>;
- clone(update: {
- headers?: HttpHeaders;
- status?: number;
- statusText?: string;
- url?: string;
- }): HttpResponse<T>;
- clone<V>(update: {
- body?: V | null;
- headers?: HttpHeaders;
- status?: number;
- statusText?: string;
- url?: string;
- }): HttpResponse<V>;
- }
- /**
- * Base class for both `HttpResponse` and `HttpHeaderResponse`.
- *
- * @publicApi
- */
- export declare abstract class HttpResponseBase {
- /**
- * All response headers.
- */
- readonly headers: HttpHeaders;
- /**
- * Response status code.
- */
- readonly status: number;
- /**
- * Textual description of response status code, defaults to OK.
- *
- * Do not depend on this.
- */
- readonly statusText: string;
- /**
- * URL of the resource retrieved, or null if not available.
- */
- readonly url: string | null;
- /**
- * Whether the status code falls in the 2xx range.
- */
- readonly ok: boolean;
- /**
- * Type of the response, narrowed to either the full response or the header.
- */
- readonly type: HttpEventType.Response | HttpEventType.ResponseHeader;
- /**
- * Super-constructor for all responses.
- *
- * The single parameter accepted is an initialization hash. Any properties
- * of the response passed there will override the default values.
- */
- constructor(init: {
- headers?: HttpHeaders;
- status?: number;
- statusText?: string;
- url?: string;
- }, defaultStatus?: number, defaultStatusText?: string);
- }
- /**
- * An event indicating that the request was sent to the server. Useful
- * when a request may be retried multiple times, to distinguish between
- * retries on the final event stream.
- *
- * @publicApi
- */
- export declare interface HttpSentEvent {
- type: HttpEventType.Sent;
- }
- /**
- * Http status codes.
- * As per https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
- * @publicApi
- */
- export declare const enum HttpStatusCode {
- Continue = 100,
- SwitchingProtocols = 101,
- Processing = 102,
- EarlyHints = 103,
- Ok = 200,
- Created = 201,
- Accepted = 202,
- NonAuthoritativeInformation = 203,
- NoContent = 204,
- ResetContent = 205,
- PartialContent = 206,
- MultiStatus = 207,
- AlreadyReported = 208,
- ImUsed = 226,
- MultipleChoices = 300,
- MovedPermanently = 301,
- Found = 302,
- SeeOther = 303,
- NotModified = 304,
- UseProxy = 305,
- Unused = 306,
- TemporaryRedirect = 307,
- PermanentRedirect = 308,
- BadRequest = 400,
- Unauthorized = 401,
- PaymentRequired = 402,
- Forbidden = 403,
- NotFound = 404,
- MethodNotAllowed = 405,
- NotAcceptable = 406,
- ProxyAuthenticationRequired = 407,
- RequestTimeout = 408,
- Conflict = 409,
- Gone = 410,
- LengthRequired = 411,
- PreconditionFailed = 412,
- PayloadTooLarge = 413,
- UriTooLong = 414,
- UnsupportedMediaType = 415,
- RangeNotSatisfiable = 416,
- ExpectationFailed = 417,
- ImATeapot = 418,
- MisdirectedRequest = 421,
- UnprocessableEntity = 422,
- Locked = 423,
- FailedDependency = 424,
- TooEarly = 425,
- UpgradeRequired = 426,
- PreconditionRequired = 428,
- TooManyRequests = 429,
- RequestHeaderFieldsTooLarge = 431,
- UnavailableForLegalReasons = 451,
- InternalServerError = 500,
- NotImplemented = 501,
- BadGateway = 502,
- ServiceUnavailable = 503,
- GatewayTimeout = 504,
- HttpVersionNotSupported = 505,
- VariantAlsoNegotiates = 506,
- InsufficientStorage = 507,
- LoopDetected = 508,
- NotExtended = 510,
- NetworkAuthenticationRequired = 511
- }
- /**
- * An upload progress event.
- *
- * Note: The `FetchBackend` doesn't support progress report on uploads.
- *
- * @publicApi
- */
- export declare interface HttpUploadProgressEvent extends HttpProgressEvent {
- type: HttpEventType.UploadProgress;
- }
- /**
- * Provides encoding and decoding of URL parameter and query-string values.
- *
- * Serializes and parses URL parameter keys and values to encode and decode them.
- * If you pass URL query parameters without encoding,
- * the query parameters can be misinterpreted at the receiving end.
- *
- *
- * @publicApi
- */
- export declare class HttpUrlEncodingCodec implements HttpParameterCodec {
- /**
- * Encodes a key name for a URL parameter or query-string.
- * @param key The key name.
- * @returns The encoded key name.
- */
- encodeKey(key: string): string;
- /**
- * Encodes the value of a URL parameter or query-string.
- * @param value The value.
- * @returns The encoded value.
- */
- encodeValue(value: string): string;
- /**
- * Decodes an encoded URL parameter or query-string key.
- * @param key The encoded key name.
- * @returns The decoded key name.
- */
- decodeKey(key: string): string;
- /**
- * Decodes an encoded URL parameter or query-string value.
- * @param value The encoded value.
- * @returns The decoded value.
- */
- decodeValue(value: string): string;
- }
- /**
- * A user-defined event.
- *
- * Grouping all custom events under this type ensures they will be handled
- * and forwarded by all implementations of interceptors.
- *
- * @publicApi
- */
- export declare interface HttpUserEvent<T> {
- type: HttpEventType.User;
- }
- /**
- * Uses `XMLHttpRequest` to send requests to a backend server.
- * @see {@link HttpHandler}
- * @see {@link JsonpClientBackend}
- *
- * @publicApi
- */
- export declare class HttpXhrBackend implements HttpBackend {
- private xhrFactory;
- constructor(xhrFactory: XhrFactory);
- /**
- * Processes a request and returns a stream of response events.
- * @param req The request object.
- * @returns An observable of the response events.
- */
- handle(req: HttpRequest<any>): Observable<HttpEvent<any>>;
- static ɵfac: i0.ɵɵFactoryDeclaration<HttpXhrBackend, never>;
- static ɵprov: i0.ɵɵInjectableDeclaration<HttpXhrBackend>;
- }
- /**
- * Retrieves the current XSRF token to use with the next outgoing request.
- *
- * @publicApi
- */
- export declare abstract class HttpXsrfTokenExtractor {
- /**
- * Get the XSRF token to use with an outgoing request.
- *
- * Will be called for every request, so the token may change between requests.
- */
- abstract getToken(): string | null;
- }
- /**
- * DI token/abstract type representing a map of JSONP callbacks.
- *
- * In the browser, this should always be the `window` object.
- *
- *
- */
- declare abstract class JsonpCallbackContext {
- [key: string]: (data: any) => void;
- }
- /**
- * Processes an `HttpRequest` with the JSONP method,
- * by performing JSONP style requests.
- * @see {@link HttpHandler}
- * @see {@link HttpXhrBackend}
- *
- * @publicApi
- */
- export declare class JsonpClientBackend implements HttpBackend {
- private callbackMap;
- private document;
- /**
- * A resolved promise that can be used to schedule microtasks in the event handlers.
- */
- private readonly resolvedPromise;
- constructor(callbackMap: JsonpCallbackContext, document: any);
- /**
- * Get the name of the next callback method, by incrementing the global `nextRequestId`.
- */
- private nextCallback;
- /**
- * Processes a JSONP request and returns an event stream of the results.
- * @param req The request object.
- * @returns An observable of the response events.
- *
- */
- handle(req: HttpRequest<never>): Observable<HttpEvent<any>>;
- private removeListeners;
- static ɵfac: i0.ɵɵFactoryDeclaration<JsonpClientBackend, never>;
- static ɵprov: i0.ɵɵInjectableDeclaration<JsonpClientBackend>;
- }
- /**
- * Identifies requests with the method JSONP and
- * shifts them to the `JsonpClientBackend`.
- *
- * @see {@link HttpInterceptor}
- *
- * @publicApi
- */
- export declare class JsonpInterceptor {
- private injector;
- constructor(injector: EnvironmentInjector);
- /**
- * Identifies and handles a given JSONP request.
- * @param initialRequest The outgoing request object to handle.
- * @param next The next interceptor in the chain, or the backend
- * if no interceptors remain in the chain.
- * @returns An observable of the event stream.
- */
- intercept(initialRequest: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
- static ɵfac: i0.ɵɵFactoryDeclaration<JsonpInterceptor, never>;
- static ɵprov: i0.ɵɵInjectableDeclaration<JsonpInterceptor>;
- }
- /**
- * Configures Angular's `HttpClient` service to be available for injection.
- *
- * By default, `HttpClient` will be configured for injection with its default options for XSRF
- * protection of outgoing requests. Additional configuration options can be provided by passing
- * feature functions to `provideHttpClient`. For example, HTTP interceptors can be added using the
- * `withInterceptors(...)` feature.
- *
- * @see {@link withInterceptors}
- * @see {@link withInterceptorsFromDi}
- * @see {@link withXsrfConfiguration}
- * @see {@link withNoXsrfProtection}
- * @see {@link withJsonpSupport}
- * @see {@link withRequestsMadeViaParent}
- * @see {@link withFetch}
- */
- export declare function provideHttpClient(...features: HttpFeature<HttpFeatureKind>[]): EnvironmentProviders;
- /**
- * Configures the current `HttpClient` instance to make requests using the fetch API.
- *
- * This `FetchBackend` requires the support of the Fetch API which is available on all evergreen
- * browsers and on NodeJS from v18 onward.
- *
- * Note: The Fetch API doesn't support progress report on uploads.
- *
- * @publicApi
- * @developerPreview
- */
- export declare function withFetch(): HttpFeature<HttpFeatureKind.Fetch>;
- /**
- * Adds one or more functional-style HTTP interceptors to the configuration of the `HttpClient`
- * instance.
- *
- * @see {@link HttpInterceptorFn}
- * @see {@link provideHttpClient}
- * @publicApi
- */
- export declare function withInterceptors(interceptorFns: HttpInterceptorFn[]): HttpFeature<HttpFeatureKind.Interceptors>;
- /**
- * Includes class-based interceptors configured using a multi-provider in the current injector into
- * the configured `HttpClient` instance.
- *
- * Prefer `withInterceptors` and functional interceptors instead, as support for DI-provided
- * interceptors may be phased out in a later release.
- *
- * @see {@link HttpInterceptor}
- * @see {@link HTTP_INTERCEPTORS}
- * @see {@link provideHttpClient}
- */
- export declare function withInterceptorsFromDi(): HttpFeature<HttpFeatureKind.LegacyInterceptors>;
- /**
- * Add JSONP support to the configuration of the current `HttpClient` instance.
- *
- * @see {@link provideHttpClient}
- */
- export declare function withJsonpSupport(): HttpFeature<HttpFeatureKind.JsonpSupport>;
- /**
- * Disables XSRF protection in the configuration of the current `HttpClient` instance.
- *
- * This feature is incompatible with the `withXsrfConfiguration` feature.
- *
- * @see {@link provideHttpClient}
- */
- export declare function withNoXsrfProtection(): HttpFeature<HttpFeatureKind.NoXsrfProtection>;
- /**
- * Configures the current `HttpClient` instance to make requests via the parent injector's
- * `HttpClient` instead of directly.
- *
- * By default, `provideHttpClient` configures `HttpClient` in its injector to be an independent
- * instance. For example, even if `HttpClient` is configured in the parent injector with
- * one or more interceptors, they will not intercept requests made via this instance.
- *
- * With this option enabled, once the request has passed through the current injector's
- * interceptors, it will be delegated to the parent injector's `HttpClient` chain instead of
- * dispatched directly, and interceptors in the parent configuration will be applied to the request.
- *
- * If there are several `HttpClient` instances in the injector hierarchy, it's possible for
- * `withRequestsMadeViaParent` to be used at multiple levels, which will cause the request to
- * "bubble up" until either reaching the root level or an `HttpClient` which was not configured with
- * this option.
- *
- * @see {@link provideHttpClient}
- * @developerPreview
- */
- export declare function withRequestsMadeViaParent(): HttpFeature<HttpFeatureKind.RequestsMadeViaParent>;
- /**
- * Customizes the XSRF protection for the configuration of the current `HttpClient` instance.
- *
- * This feature is incompatible with the `withNoXsrfProtection` feature.
- *
- * @see {@link provideHttpClient}
- */
- export declare function withXsrfConfiguration({ cookieName, headerName }: {
- cookieName?: string;
- headerName?: string;
- }): HttpFeature<HttpFeatureKind.CustomXsrfConfiguration>;
- /**
- * Returns the DI providers needed to enable HTTP transfer cache.
- *
- * By default, when using server rendering, requests are performed twice: once on the server and
- * other one on the browser.
- *
- * When these providers are added, requests performed on the server are cached and reused during the
- * bootstrapping of the application in the browser thus avoiding duplicate requests and reducing
- * load time.
- *
- */
- export declare function ɵwithHttpTransferCache(): Provider[];
- export { }
|