deblockt / hal-rest-client

Typescript HAL Rest client
Apache License 2.0
25 stars 11 forks source link

Resource Variables override each other #43

Open aalolexx opened 5 years ago

aalolexx commented 5 years ago

If i create multiple "sub-requests" out of the same main Request, those sub request seem to override each others properties.

this.mainRequest = await getResponseFromEntryPoint('/')
this.resource1 = await this.mainRequest.link('byKey').fetch({key: 'keyVal1'})
this.resource2 = await this.mainRequest.link('byKey').fetch({key: 'keyVal2'})
this.resource3 = await this.mainRequest.link('byKey').fetch({key: 'keyVal3'})

These resource variables override each other. Therefore the edit link on all those resources is the same, the one of the last request.

Is this a bug or am I just using the hal-rest-client wrong?

jwanner83 commented 5 years ago

I'm facing the same issue...