1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -59,16 +59,21 @@ public function execute(
59
59
60
60
$ method = nonempty (idx ($ settings , 'method ' ), 'POST ' );
61
61
62
- $ content_type = $ settings ['content_type ' ];
63
-
64
62
$ future = id (new HTTPSFuture ($ uri ))
65
63
->setMethod ($ method )
66
64
->setTimeout (60 );
67
65
66
+ $ content_type = $ settings ['content_type ' ];
68
67
if ($ content_type ) {
69
68
$ future ->addHeader ('Content-Type ' , $ content_type );
70
69
}
71
70
71
+ $ body = $ settings ['http_body ' ];
72
+ if ($ body ) {
73
+ $ body = $ this ->mergeVariables ('vurisprintf ' , $ body , $ variables );
74
+ $ future ->setData ($ body );
75
+ }
76
+
72
77
$ credential_phid = $ this ->getSetting ('credential ' );
73
78
if ($ credential_phid ) {
74
79
$ key = PassphrasePasswordKey::loadFromPHID (
@@ -117,6 +122,11 @@ public function getFieldSpecifications() {
117
122
'type ' => 'text ' ,
118
123
'required ' => false ,
119
124
),
125
+ 'http_body ' => array (
126
+ 'name ' => pht ('HTTP Body ' ),
127
+ 'type ' => 'text ' ,
128
+ 'required ' => false ,
129
+ ),
120
130
);
121
131
}
122
132
0 commit comments