-
-
Notifications
You must be signed in to change notification settings - Fork 241
getCookie issue with 0.1.8 using Http #305
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
Comments
PR merged |
Btw, the quick and dirty workaround until the fix is live is to add the not implemented method(somehere in the
|
Is it fixed yet? |
Yes - version 0.2.0 has the fix |
This is odd, are you sure this is fixed? This is what I did to confirm.
import {Component} from "@angular/core";
import {HTTP_PROVIDERS, Http, Headers} from "@angular/http";
import {Observable} from "rxjs/Rx";
@Component({
selector: "my-app",
templateUrl: "app.component.html",
providers: [HTTP_PROVIDERS]
})
export class AppComponent {
constructor(private _http: Http) {
}
public onTap() {
this.createUser()
.subscribe(
() => alert('Your account was successfully created.'),
() => alert('Unfortunately we were unable to create your account.')
);
}
private createUser() {
const headers = new Headers();
headers.append("Content-Type", "application/json");
const body = JSON.stringify({
Username: '[email protected]',
Email: '[email protected]',
Password: 'foobar'
});
return this._http.post('https://api.everlive.com/v1/GWfRtXi1Lwt4jcqK/Users', body, {headers}).catch(this.handleErrors);
}
handleErrors(error: Response) {
console.log(JSON.stringify(error.json()));
return Observable.throw(error);
}
}
By adding the "hack", it works. The |
Confirmed - I'm still getting the crash. Reopening for investigation. |
OK, some updates: However, if you add For now: You can just add General Fix Proposal: Export |
@vakrilov working up PR to handle this now. Curious your opinion: |
@samarthagarwal @SamVerschueren Final fix is here: #321 Once that lands, you can use this guide: https://github.com/NativeScript/nativescript-angular/wiki/Http |
👍 |
I'm not familiar with the {N} core or the technical implementation whatsoever, but is it technically not possible to patch the |
Agreed here, and I think this is going to confuse a fair number of people, especially considering the error message doesn’t point you in the right direction at all. If this is indeed a necessity, is there anything we can do to point people in the right direction when they use |
Agree - making HTTP_PROVIDERS just work would be the easiest option to use. However, I don't see how this can be done, because of the way HTTP_PROVIDERS are defined. The One more argument for the |
I hit this after upgrading from 0.2.0 to 0.3.0. I've always been bootstrapping with |
Fixed by #286
The text was updated successfully, but these errors were encountered: