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

[bug] http.client.post() fails with "missing field timeout" #4036

Closed
qu1ck opened this issue May 3, 2022 · 1 comment
Closed

[bug] http.client.post() fails with "missing field timeout" #4036

qu1ck opened this issue May 3, 2022 · 1 comment

Comments

@qu1ck
Copy link

qu1ck commented May 3, 2022

Describe the bug

I'm doing following in javascript

        if (!this.client) {
            this.client = await http.getClient(
                { connectTimeout: 15, maxRedirections: 3 });
        }

        var response = await this.client.post(
            this.url,
            { type: "Json", payload: data },
            { headers: this.headers });

And instead of the response I get:

"missing field timeout"

If I add timeout parameter to HttpOptions in post() it works, but according to the docs I shouldn't have to.

Reproduction

No response

Expected behavior

I get the response without having to pass in timeout in HttpOptions.

Platform and versions

Environment
  › OS: Windows 10.0.19044 X64
  › Webview2: 101.0.1210.32
  › MSVC: 
      - Visual Studio Community 2019
  › Node.js: 16.14.2
  › npm: 8.5.0
  › pnpm: Not installed!
  › yarn: Not installed!
  › rustup: 1.24.3
  › rustc: 1.59.0
  › cargo: 1.59.0
  › Rust toolchain: stable-x86_64-pc-windows-msvc 

Packages
  › @tauri-apps/cli [NPM]: 1.0.0-rc.9
  › @tauri-apps/api [NPM]: 1.0.0-rc.4
  › tauri [RUST]: git+https://github.com/tauri-apps/tauri.git?rev=220e746#220e7460148df476171579878c3cfffcdb1423d8 (1.0.0-rc.8),
  › tauri-build [RUST]: 1.0.0-rc.7,
  › tao [RUST]: 0.8.3,
  › wry [RUST]: 0.15.1,

Stack trace

No response

Additional context

Had to update to tauri@HEAD because of #4004 which is likely related.

@qu1ck qu1ck added the type: bug label May 3, 2022
@lucasfernog
Copy link
Member

Thanks for catching that!

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

No branches or pull requests

2 participants