You need to sign in to do that
Don't have an account?

Hello this is the error "Arithmetic expressions must use numeric arguments " is the error Kindly help!
1) @RestResource(urlMapping='/trippleInteger/')
2) global class MyService {
3) @HttpGet
4) global static Integer trippleIt() {
5) String someNumber = RestContext.request.params.get('yourInteger');
6) return someNumber *3;
}
}
2) global class MyService {
3) @HttpGet
4) global static Integer trippleIt() {
5) String someNumber = RestContext.request.params.get('yourInteger');
6) return someNumber *3;
}
}
You can use Workbench 'https://workbench.developerforce.com/login.php' to call the service, using the url yourSiteUrl../services/apexrest/trippleInteger?yourInteger=123.
If your problem is solved, mark the answer as best answer and for another question, start a new thread. and provide me the link, I will definitely help you.
Thanks,
Neetu
All Answers
Make sure that your service will have the Integer value for param 'yourInteger' and use the following code: Let me know, if you need any other information.
Thanks,
Neetu
@neetu thank you ma'am. Another question for you. How do I call this service ?
You can use Workbench 'https://workbench.developerforce.com/login.php' to call the service, using the url yourSiteUrl../services/apexrest/trippleInteger?yourInteger=123.
If your problem is solved, mark the answer as best answer and for another question, start a new thread. and provide me the link, I will definitely help you.
Thanks,
Neetu