Skip to content

Commit

Permalink
workaround compression issue
Browse files Browse the repository at this point in the history
  • Loading branch information
EricWittmann committed Nov 13, 2024
1 parent 7695a9f commit c531f4d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions typescript-sdk/lib/sdk/factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
ParseNodeFactoryRegistry,
ParseNodeFactory, type SerializationWriterFactory
} from "@microsoft/kiota-abstractions";
import { FetchRequestAdapter } from "@microsoft/kiota-http-fetchlibrary";
import { FetchRequestAdapter, HeadersInspectionHandler, KiotaClientFactory, ParametersNameDecodingHandler, RedirectHandler, RetryHandler, UserAgentHandler } from "@microsoft/kiota-http-fetchlibrary";
import { JsonParseNodeFactory, JsonSerializationWriterFactory } from "@microsoft/kiota-serialization-json";
import { ApicurioRegistryClient, createApicurioRegistryClient } from "../generated-client/apicurioRegistryClient.ts";
import {
Expand All @@ -32,7 +32,10 @@ export class RegistryClientFactory {
if (authProvider === undefined || authProvider === null) {
authProvider = new AnonymousAuthenticationProvider();
}
const requestAdapter: RequestAdapter = new FetchRequestAdapter(authProvider, localParseNodeFactory, localSerializationWriterFactory);
const http = KiotaClientFactory.create(undefined, [
new RetryHandler(), new RedirectHandler(), new ParametersNameDecodingHandler(), new UserAgentHandler(), new HeadersInspectionHandler()
]);
const requestAdapter: RequestAdapter = new FetchRequestAdapter(authProvider, localParseNodeFactory, localSerializationWriterFactory, http);
requestAdapter.baseUrl = baseUrl;
return createApicurioRegistryClient(requestAdapter);
}
Expand Down

0 comments on commit c531f4d

Please sign in to comment.