Skip to content

Commit a99388d

Browse files
committed
include a timeout for cfhttp
1 parent 35b15b3 commit a99388d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/lib/auth0.cfc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,7 @@ component {
749749
var accessToken = getAccessToken();
750750
var stResult = {};
751751

752-
cfhttp(method="PATCH", url="https://" & variables.instance.domain & "/api/v2/users/" & encodeForUrl(arguments.userID), result="stResult") {
752+
cfhttp(method="PATCH", url="https://" & variables.instance.domain & "/api/v2/users/" & encodeForUrl(arguments.userID), result="stResult", timeout=10) {
753753
cfhttpparam(type="header", name="Authorization", value="Bearer #accessToken#");
754754
cfhttpparam(type="header", name="Content-Type", value="application/json");
755755
cfhttpparam(type="body", value='{"user_metadata": {"firstname": "#arguments.first_name#", "lastname": "#arguments.last_name#"}}');
@@ -775,7 +775,7 @@ component {
775775

776776
var stResponse = {};
777777

778-
cfhttp(method=arguments.method, url=httpUrl, result="stResponse") {
778+
cfhttp(method=arguments.method, url=httpUrl, result="stResponse", timeout=30) {
779779
if (structKeyExists(arguments, "body")) {
780780
cfhttpparam(type="header", name="Content-Type", value="application/json");
781781
cfhttpparam(type="body", value=serializeJSON(arguments.body));

0 commit comments

Comments
 (0)