| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151 |
- /**
- * @license Angular v16.0.4
- * (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';
- /**
- * 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/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.
- */
- 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
- }
- /**
- * 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#intercepting-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)[];
- });
- /**
- * 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;
- }
- /**
- * 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#intercepting-requests-and-responses)
- *
- * @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 have access to `inject()` via the `EnvironmentInjector` from which they were
- * configured.
- */
- 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.
- */
- 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 | 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.
- *
- * @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}
- */
- export declare function provideHttpClient(...features: HttpFeature<HttpFeatureKind>[]): EnvironmentProviders;
- /**
- * 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 { }
|