Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for non-string type request #7

Open
MohibWasay opened this issue Mar 1, 2017 · 2 comments
Open

support for non-string type request #7

MohibWasay opened this issue Mar 1, 2017 · 2 comments

Comments

@MohibWasay
Copy link

Plugin currently only supports requests that are for jsonapi,

updateTrainer(trainer: string): Observable<Response> {
  return this.httpClient.post('trainer', trainer);
}

Need support for non-string body based requests

updateTrainer(trainer: Trainer): Observable<Response> {
  return this.httpClient.post('trainer', trainer);
}
@mohuk
Copy link
Owner

mohuk commented Mar 1, 2017

Can you explain the use case ?

@MohibWasay
Copy link
Author

    post(url: string, body: string, options?: RequestOptionsArgs): Observable<Response> {
        let opts: RequestOptionsArgs = this.build(RequestMethod.Post, url, options, body);
        return this.request(url, opts);
    }

What if my body is not a string? This enforces me to transform my request object to string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants