You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've begun integrating this into our project as it looks like a promising way to cut down repetition for requests (of which there are a considerable amount). One small thing I ran into however was adding params to the requests -- which we do for almost all requests -- which now has to be done with string concatenation. This feels fairly clunky compared to e.g. @angular/http/common which allows passing a map of the params.
What is your opinion on providing a optional key params to the RequestParam type? If you are interested I can see if I can make a PR.
The text was updated successfully, but these errors were encountered:
Yeah, that sounds like a useful PR. I'd merge that.
If params is undefined use the url without modifications.
If params is defined, then:
Format the keys and values in the params object like this [key]=[value] and join them with an &
2.a. If the url already has a ?, append the params string with an &
2.b. If the url does not have a ?, append the params string with a ?
I've begun integrating this into our project as it looks like a promising way to cut down repetition for requests (of which there are a considerable amount). One small thing I ran into however was adding params to the requests -- which we do for almost all requests -- which now has to be done with string concatenation. This feels fairly clunky compared to e.g.
@angular/http/common
which allows passing a map of the params.What is your opinion on providing a optional key
params
to theRequestParam
type? If you are interested I can see if I can make a PR.The text was updated successfully, but these errors were encountered: