How to send a parameter on the all of request in Restangular

Issue

I want to send a parameter as lang for all request that use rectangular. Is there any way so I that add this parameter in app.config section?

Thanks

Solution

Set the value in the interceptor, e.g:

Restangular.setDefaultRequestParams({lang: "en"});

Link: setdefaultrequestparams

Answered By – Pranab Mitra

Answer Checked By – Mary Flores (AngularFixing Volunteer)

Leave a Reply

Your email address will not be published.