0

How can I call Rest API post method that has parameters into php codes? . I just want the proper format for calling .

Here is my Code.

@RestResource(urlMapping='/Event/*')
global with sharing class AS_EventAndApplication {

@HttpGet
global static void getEventAndApplication()
{       
    //code goes here
}

@HttpPost
global static ResponseHandler post(String eventId, String appFormId, String contactId, String appData)
{
   //code goes here
}
}

PHP CODE FOR GET

    $query = 'Event';
    $url = $this->instance_url . "/services/apexrest/" . $query;

PHP CODE FOR POST ?

    $query = '??????<-what should I put here ?? base on my apex rest code above';
    $url = $this->instance_url . "/services/apexrest/" . $query;
0

I would suggest use workbench for testing

https://workbench.developerforce.com/

Above utilities --> click -->Rest explorer

enter image description here

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.