-
Notifications
You must be signed in to change notification settings - Fork 46
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
i want to change PUT request target #10
Comments
Please provide full code of you UserRes class. |
|
Please read docs before creating issues like that. // Import necessary staff
import {Resource, ResourceParams, ResourceAction, ResourceResult} from "ng2-resource-rest";
import {Injectable} from "angular2/core";
import {RequestMethod} from "angular2/http";
// Make it Injectable
@Injectable()
// Decorate the your resource class
@ResourceParams({
// Url to api
url: 'https://domain.net/api',
// Api path
path: '/users/{id}'
})
export class UserRes extends Resource {
@ResourceAction({
method: RequestMethod.Put,
path: '/users'
})
update(data:any, callback?:Function): ResourceResult { return null; }
@ResourceAction({
method: RequestMethod.Put,
path: '/users'
})
myUpdate(data:any, callback?:Function): ResourceResult { return null; }
} |
thank you very much |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
i used http://www.django-rest-framework.org/
i want change request to https://domain.net/api/users/ , not https://domain.net/api/users/1
could you help me ?
The text was updated successfully, but these errors were encountered: