firecamp-dev / firecamp

Developer-first OpenSource API DevTool, Postman/Insomnia alternative.
https://firecamp.dev
GNU Affero General Public License v3.0
2.1k stars 137 forks source link

[bug]: Saving a request response does not properly save all headers to the request. #166

Open TrevorBenson opened 10 months ago

TrevorBenson commented 10 months ago

Describe the bug Saving a response does not properly save the response Headers.

After defining a route and clicking send the response opens a response results in a right side panel. The body and complete headers are in the right side panel. Sometimes I see the Content-Type updated in the center panel of the request. Sometimes I do not see any Headers in the center panel. When there are no changes to the center panel headers, clicking the Save button results in the INFO box saying The request doesn't have any changes to be saved while the right side panel shows there are 5 Headers in the response.

To Reproduce Steps to reproduce the behavior:

  1. Define a request (route)
  2. Click the Send button
  3. Observe the responses Body, Headers, Timeline, Test Result appear in a side panel to the right of the requests normal (center) Body, Auth, Headers, etc.
  4. Observe either no Headers are showne in the center panel, or possibly some headers
    • In my case it was Content-Type: application/json.
  5. Click the Save button, and observe it mentions saving the request if some headers are in the center panel, or that it has nothing to be saved when no headers are in the center panel.
  6. Close the request.
  7. Open the request.
  8. Observe that the headers are either empty or a subset of the headers returned in the response.

Expected behavior The headers should be saved with the response when clicking save. Presumably in the center panel since that is what appears to be loaded and it has a Headers tab.

Desktop (please complete the following information): OS: Linux, Fedora 39 Browser: Firecamp desktop app Version: 3.3.0-beta.1

Nishchit14 commented 10 months ago

Thank you @TrevorBenson for the detailed information. If it is handy for you to share the screenshot then It would help me to debug more precisely with your usecase.

By centre panel, you mean the request body/headers, right?