Skip to content

Conversation

@hxzhao527
Copy link
Contributor

fix https://feedback.yaak.app/p/couldnt-use-the-copy-body-option-when-request-to-some

I couldn't find out why the response's bodyPath is empty here.
So I try to fix it on the Rust side.

I tried to add debug log at

export function HttpResponsePane({ style, className, activeRequestId }: Props) {
const { activeResponse, setPinnedResponseId, responses } = usePinnedHttpResponse(activeRequestId);
const [viewMode, setViewMode] = useResponseViewMode(activeResponse?.requestId);
const [activeTabs, setActiveTabs] = useLocalStorage<Record<string, string>>(
'responsePaneActiveTabs',
{},
);
const contentType = getContentTypeFromHeaders(activeResponse?.headers ?? null);
const mimeType = contentType == null ? null : getMimeTypeFromContentType(contentType).essence;
const tabs = useMemo<TabItem[]>(

const contentType = getContentTypeFromHeaders(activeResponse?.headers ?? null);
const mimeType = contentType == null ? null : getMimeTypeFromContentType(contentType).essence;
console.log("Rendering HttpResponsePane for request", activeRequestId, "with response", activeResponse, "and viewMode", viewMode);
const tabs = useMemo<TabItem[]>(

It seems that the response was rendered when the request was sent and not updated then.

@gschier
Copy link
Member

gschier commented Dec 28, 2025

If the response was rendered in the UI, it means bodyPath must have been set. I don't think this is the correct solution. We should first try to reproduce the problem.

@gschier gschier closed this Dec 28, 2025
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

Successfully merging this pull request may close these issues.

2 participants