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;

1 Answer 1

0

I would suggest use workbench for testing

https://workbench.developerforce.com/

Above utilities --> click -->Rest explorer

enter image description here

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .