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

ReferenceError: FormData is not defined - SSR POST request #106

Open
Grandnainconnu opened this issue Oct 9, 2020 · 0 comments
Open

ReferenceError: FormData is not defined - SSR POST request #106

Grandnainconnu opened this issue Oct 9, 2020 · 0 comments

Comments

@Grandnainconnu
Copy link

Grandnainconnu commented Oct 9, 2020

Hello,

There is a problem to find basic types during SSR request in nextjs getServerSideProps.
It appears that Node has some problems to validate basic types, FormData and Blob.

Request tried:

export const listFromCategory = ({ categorySlug, limit = 24, page = 1 }: { categorySlug: string, limit?: number, page?: number }): Action => ({
    method: 'POST',
    endpoint: `/products/list/limit/${limit}/page/${page}`,
    body: {
        domain: {
            type: 'category',
            value: categorySlug,
        },
    },
    credentials: 'omit',
});

Is there something that I'm doing wrongly?

Thank you in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant