mean-expert-official / loopback-sdk-builder

Tool for auto-generating Software Development Kits (SDKs) for LoopBack
Other
399 stars 178 forks source link

HttpHeaders bug #571

Open danielhanzs opened 6 years ago

danielhanzs commented 6 years ago

What type of issue are you creating?

What version of this module are you using?

Write other if any: 2.2.0 new realease

Please add a description for your issue:

urlParams. filter and urlParams.where in get request appends filter and where to headers

headers.append('filter', JSON.stringify(urlParams.filter));

It needs to repleace the headers variable to be sent.

headers = headers.append('filter', JSON.stringify(urlParams.filter));

jerowe commented 6 years ago

This is a bug for me also.

Thanks so much for the fix! I was really banging my head over here. ;-)

andrewwiik commented 6 years ago

@jonathan-casarrubias Could you merge this change into the next release before you stop updating this project?

jonathan-casarrubias commented 6 years ago

@andrewwiik Sure I'll keep integrating PRs as they arrive and I'm able to do it, I won't stop publishing any contribution the community send.

Said that, please don't worry like this is an entirely dead project, as long as the community keeps updating it I'll maintain sending new versions.

I'll review the PR ASAP.

Cheers Jon

dmastag commented 6 years ago

Created the Patch for this

jonathan-casarrubias commented 6 years ago

@dmastag I just landed your patch under version 2.2.1 👍

eyeswideopen commented 5 years ago

I'm still unable to use 'where' within a filter: this.myApi.getRelatedModel(id, { where: { finished: { exists: false } }, include: [ { some: 'stuff' } ] }).subscribe(...)

Am i to blame or is the filter still not working properly?

(the given code snippet above still returns results with the field "finished" set. It worked like this with the builtin loopback angular 1 sdk builder)

Version used to generate the SDK: @mean-expert/loopback-sdk-builder@2.3.1

Thanks in advance for any help or hints!