capacitor-community / http

Community plugin for native HTTP
MIT License
208 stars 136 forks source link

setCookie is not being applied #234

Closed lemonrecognize closed 2 years ago

lemonrecognize commented 2 years ago

Describe the bug

I'm trying to set the cookie like

await Http.setCookie({
  url: 'http://smth.smth.something.com'
  key: 'session',
  value: 'some-token'
})

Then, when trying to call API using the same plugin like:

const response = await Http
  .request({
    method: 'GET',
    url: 'http://smth.smth.something.com/api/user',
  })

Server never receives cookie as it's not being added to the request

Expected behavior Cookie gets sent to server

Smartphone:

lemonrecognize commented 2 years ago

Never mind, the plugin works; we had other underlying issues that resulted in this false assumption