I have below class which i need to test it from workbench/postman. I am not sure how should i test it .

global with sharing class example1 {
 global static void doPost() {
    Http h = new Http();
    HttpRequest hr = new HttpRequest();
    HttpResponse hrs = h.send(hr);
    RestResponse res = RestContext.response;
    res.addHeader('Content-Type', 'application/soap+xml');
    res.statusCode = 200;


where should i set passowrd and username ,what should my end url.please suggest

  • From where are you setting value to username and password variable? – Pranay Jaiswal Oct 15 '19 at 9:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.