Apex JSONを渡すPOSTメソッドサンプル
環境
salesforce
JSONデータ
{
"emp": {
"name": "yamada"
"city": "tokyo"
}
}
ApexメソッドにJSONをリクエストボディとして渡します。
@HttpPost
global static void doPost(Map<String,String> emp)(
String str = emp.get("name");
}
Coding Changes the World
環境
salesforce
JSONデータ
{
"emp": {
"name": "yamada"
"city": "tokyo"
}
}
ApexメソッドにJSONをリクエストボディとして渡します。
@HttpPost
global static void doPost(Map<String,String> emp)(
String str = emp.get("name");
}