Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After update to 1.20.0 kiota my body instead of json is binary data in request #1497

Closed
illunix opened this issue Nov 21, 2024 · 1 comment
Closed

Comments

@illunix
Copy link
Contributor

illunix commented Nov 21, 2024

Hello, after update to 1.20.0 kiota, I've tried to test things out and it seems that request that always was sending json body right now is sending something like binary data?

Image

Packages versions that I use

        "@microsoft/kiota-abstractions": "1.0.0-preview.76",
        "@microsoft/kiota-bundle": "1.0.0-preview.76",
        "@microsoft/kiota-http-fetchlibrary": "1.0.0-preview.76",
        "@microsoft/kiota-serialization-form": "1.0.0-preview.76",
        "@microsoft/kiota-serialization-json": "1.0.0-preview.76",
        "@microsoft/kiota-serialization-multipart": "1.0.0-preview.76",
        "@microsoft/kiota-serialization-text": "1.0.0-preview.76",

Generated request

export interface SignInRequestBuilder extends BaseRequestBuilder<SignInRequestBuilder> {
    /**
     * @param body The request body
     * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
     * @returns {Promise<ValidatedResultJsonWebToken>}
     * @throws {ValidatedResult} error when the service returns a 400 status code
     */
     post(body: SignInDto, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<ValidatedResultJsonWebToken | undefined>;
    /**
     * @param body The request body
     * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
     * @returns {RequestInformation}
     */
     toPostRequestInformation(body: SignInDto, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;
}
/**
 * Uri template for the request builder.
 */
export const SignInRequestBuilderUriTemplate = "{+baseurl}/v1/auth/sign-in";
/**
 * Metadata for all the requests in the request builder.
 */
export const SignInRequestBuilderRequestsMetadata: RequestsMetadata = {
    post: {
        uriTemplate: SignInRequestBuilderUriTemplate,
        responseBodyContentType: "application/json, text/plain;q=0.9",
        errorMappings: {
            400: createValidatedResultFromDiscriminatorValue as ParsableFactory<Parsable>,
        },
        adapterMethodName: "send",
        responseBodyFactory:  createValidatedResultJsonWebTokenFromDiscriminatorValue,
        requestBodyContentType: "application/json",
        requestBodySerializer: serializeSignInDto,
        requestInformationContentSetMethod: "setContentFromParsable",
    },
};
@github-project-automation github-project-automation bot moved this to Needs Triage 🔍 in Kiota Nov 21, 2024
@illunix illunix changed the title After update to 1.20.0 kiota my body instead of json is binary data in requests After update to 1.20.0 kiota my body instead of json is binary data in request Nov 21, 2024
@baywet
Copy link
Member

baywet commented Nov 21, 2024

Closing as duplicate of #1439

@baywet baywet closed this as not planned Won't fix, can't repro, duplicate, stale Nov 21, 2024
@github-project-automation github-project-automation bot moved this from Needs Triage 🔍 to Done ✔️ in Kiota Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done ✔️
Development

No branches or pull requests

2 participants