-
Notifications
You must be signed in to change notification settings - Fork 3
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
how to get the updated response from client PUT #103
Comments
Hi @sazyadav . In your case, does the server change what was stored and returned the updated body in the HTTP response? We have an open ticket to support There is a workearound right now though, if your server returns the const put = async (url: string, data: any) => {
const client = ClientAPI.getInstance();
const resource = client.go(url);
await resource.put({ data });
const newState = await resource.get();
return newState.data;
}; This will be served from cache without doing a HTTP request with your new data if the server returned |
Hi @evert , thanks for your reply. with const newState = await resource.get(); How can I acheive the same with react ketting. |
hi @sazyadav can you edit your question to fix the formatting? it's hard to follow right now. To have syntax highlighting work code blocks need to start with
|
I need to return the updated state data with PUT response :
const put = async (url: string, data: any) => {
const client = ClientAPI.getInstance();
const resource = client.go(url);
return await resource.put({ data });
};
but getting undefined.
could you please help me to get the updated respone from the PUT request
The text was updated successfully, but these errors were encountered: