troyanskiy / ngx-resource

Resource (REST) Client for Angular 2
http://troyanskiy.github.io/ngx-resource/
200 stars 46 forks source link

@ResourceAction decorator doesn't respect "headers" parameter #145

Closed tavai89 closed 7 years ago

tavai89 commented 7 years ago

Hi, I am not sure if this is not my mistake or misunderstanding, but looks like when I trying to set custom request headers the at @ResourceAction level, ngx-resource doesn't "respect" it.

@ResourceAction({
        url: AppConfig.envs[AppConfig.env].resources.base + '/Projects/{!ProjectId}/Deliverables/{!DeliverableId}/TestScenarios/{!TestScenarioId}/TestCases/{!Id}/Record',
        method: RequestMethod.Post,
        headers: {
            'Content-Type': undefined,
            'enctype': 'multipart/form-data'
        }
    })

When I sending this request and inspecting it with Chrome Dev Tools, I don't see those headers is set for this request.

Can you please help me?

Thanks in advance

troyanskiy commented 7 years ago

Hello. I'm no longer providing support for the library, because I have new one. I would offer you to try new one where it's much more easier specify request types. Please try to switch to rest-core with rest-ngx module.

tavai89 commented 7 years ago

Cool! Thank you. I will try new one 👍