Skip to main content
3 of 4
improve formatting
Siarhey Uchukhlebau
  • 16.2k
  • 11
  • 57
  • 89

We insert our JSON data in request body in this form:

{ "firstname":"vijay", "secondname":"bokka", "email":"[email protected]" } 

As part of api implementation one method will be invoked when api url is trigged.

To that method interface write:

apiinvokedmethod($firstname, $secondname, $email) { } 

You can access value of $firstname automatically in the class where you implemented this interface class.

NOTE: The value of key in json and name of the method parameter should be equal.

vijay b
  • 362
  • 1
  • 5
  • 15