Open quentinbinotcarrier opened 2 years ago
I also tried to override the fetch by what I think is the standard implementation. But it does not seems to do the trick.
const client = new Client({
base: new URL("http://localhost:8084"),
fetch: fetch
})
Apparently only the useWatch
method has this behavior.
Was a solution ever found for this? There's no clear way to create a client instance for a non-fin host. Just using native SkySpark and finStackAuth
keeps showing up as part of the request & get a Error: Cannot acquire attest key
import logo from "./logo.svg";
import "./App.css";
import React from "react";
import { defs, HDict, HRef, HStr, HVal } from "haystack-core";
import { Client } from "haystack-nclient";
import { ClientContext, useWatch } from "haystack-react";
const client = new Client({
base: new URL("http://localhost:8080"),
project: "homeBrew",
fetch: fetch,
});
function App() {
const { grid, isLoading, error } = useWatch({
filter: "point and curVal",
pollRate: 1,
});
if (isLoading) {
return <h1>Loading...</h1>;
}
if (error) {
return <h1>Error: {error.message}</h1>;
}
return (
<div className="App">
<ClientContext.Provider value={client}>
<div>Testing...</div>
</ClientContext.Provider>
</div>
);
}
export default App;
Hello,
I'm trying to use haystack-react / haystack-nclient with a haystack server that uses a proprietary token authentification. When I create Client, it seems to create a POST request to
http://localhost:3000/finStackAuth
whatever I do... and get stuck here.Is there a way to skip this step and configure the header myself ?
Note: In my case the server is a completely different host.
My code is pretty simple so I will share it below :
Thanks for your help.