OneKeyHQ / OneKeyHQ/app-monorepo
[BUG]: set-cookie when making requests inside desktop client
- Dominant language
- TypeScript
- Stars
- 2.4k
- Forks
- 535
- Avg merge
- 21h 55m
- Merged PRs (30d)
- 497
Description
**Describe the bug**
cannot access set-cookie headers when making any requests inside app (GET/POST/PATCH etc)
**To Reproduce**
Steps to reproduce the behavior: tried within my service file, made a seperate one for testing purposes:
```@backgroundClass()
class ServiceMonitor extends ServiceBase {
@backgroundMethod()
async test() {
const result = await axios.post('https://jsonplaceholder.typicode.com/posts', {
userId: 1,
title: 'Test Title',
body: 'Test Body',
});
console.log(result.data);
}
}```
**Expected behavior**
should be able to access set-cookie header from response
**Desktop (please complete the following information):**
- OS: macOS
- Browser [e.g. chrome, safari]
- Version [all]
**Additional context**
Add any other context about the problem here.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the ServiceMonitor example and trace how ServiceBase and backgroundMethod handle the axios.post response in the desktop client. Reproduce the request against jsonplaceholder.typicode.com, then inspect the response-handling path to determine whether the set-cookie header is exposed. Done means the response's set-cookie header is accessible for requests made inside the app.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- electron, typescript
- Domain
- desktop, networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100