※この記事は英語版を翻訳しており、一部に機械翻訳を含むため内容は後日更新される可能性があります。最新の内容は英語版を参照してください。表示言語は画面右下の言語名から切り替えられます。
try {
//Execute web service call here
HTTPResponse res = http.send(req);
//Helpful debug messages
System.debug(res.toString());
System.debug('STATUS:'+res.getStatus()); System.debug('STATUS_CODE:'+res.getStatusCode());
} catch(System.CalloutException e) {
//Exception handling goes here.... retry the call, whatever
}
状況コードとエラー応答
コールアウトのタイムアウトは Apex コードで設定できます (1 回のコールアウトの最大設定まで)
1 HttpRequest req = new HttpRequest();
2 req.setTimeout(2000); // タイムアウト (ミリ秒単位)
デフォルトのタイムアウトは 10 秒です。最小値は 1 ミリ秒であり、最大値は 120 秒です。コールアウトがタイムアウトである場合は、それを回避するために HTTP 要求のタイムアウト値を増やしてみてください。
000387845

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.