@@ -118,12 +118,12 @@ component accessors="true" {
118
118
property name = " headers" ;
119
119
120
120
/**
121
- * A struct of headers for the request.
121
+ * A struct of cookies for the request.
122
122
*/
123
123
property name = " cookies" ;
124
124
125
125
/**
126
- * A struct of query parameters for the request.
126
+ * An array of query parameters for the request.
127
127
*/
128
128
property name = " queryParams" ;
129
129
@@ -194,6 +194,8 @@ component accessors="true" {
194
194
/**
195
195
* Initialize a new HyperRequest.
196
196
*
197
+ * @httpClient The HTTP client to use for the request. Must implement HyperHttpClientInterface.
198
+ *
197
199
* @return s The HyperRequest instance.
198
200
*/
199
201
function init ( httpClient = new CfhttpHttpClient () ) {
@@ -598,7 +600,7 @@ component accessors="true" {
598
600
}
599
601
600
602
/**
601
- * Gets the first value for a certian query parameter.
603
+ * Gets the first value for a certain query parameter.
602
604
* @deprecated Use `getQueryParamByName`
603
605
*
604
606
* @name The name of the query parameter to retrieve its value.
@@ -611,7 +613,7 @@ component accessors="true" {
611
613
}
612
614
613
615
/**
614
- * Gets the first value for a certian query parameter.
616
+ * Gets the first value for a certain query parameter.
615
617
*
616
618
* @name The name of the query parameter to retrieve its value.
617
619
*
@@ -629,7 +631,7 @@ component accessors="true" {
629
631
}
630
632
631
633
/**
632
- * Get all the values for a certian query parameter.
634
+ * Get all the values for a certain query parameter.
633
635
*
634
636
* @name The name of the query parameter to retrieve all of its values.
635
637
*
@@ -713,7 +715,7 @@ component accessors="true" {
713
715
/**
714
716
* Add additional cookies to the request.
715
717
*
716
- * @headers A struct of cookies to add to the request.
718
+ * @cookies A struct of cookies to add to the request.
717
719
*
718
720
* @return s The HyperRequest instance.
719
721
*/
@@ -984,7 +986,7 @@ component accessors="true" {
984
986
/**
985
987
* A convenience method to set the User-Agent header.
986
988
*
987
- * @type The User-Agent value for the request.
989
+ * @userAgent The User-Agent value for the request.
988
990
*
989
991
* @return s The HyperRequest instance.
990
992
*/
@@ -1034,6 +1036,8 @@ component accessors="true" {
1034
1036
* Returns the full url for the request.
1035
1037
* Combines the baseURL, the URL, and the serialized queryParams.
1036
1038
*
1039
+ * @withQueryString Whether to include the query string in the full url.
1040
+ *
1037
1041
* @return s The full url for the request.
1038
1042
*/
1039
1043
function getFullUrl ( withQueryString = false ) {
@@ -1208,6 +1212,15 @@ component accessors="true" {
1208
1212
return this ;
1209
1213
}
1210
1214
1215
+ /**
1216
+ * Configures the request's retry by setting the number of attempts, delays between attempts, and condition
1217
+ *
1218
+ * @attempts The maximum number of attempts to retry or an array of delays for each attempt.
1219
+ * @delay The number of milliseconds to wait between retries.
1220
+ * @predicate A predicate function to determine if the retry should be attempted.
1221
+ *
1222
+ * @return s The HyperRequest instance.
1223
+ */
1211
1224
public HyperRequest function retry (
1212
1225
required any attempts ,
1213
1226
numeric delay ,
@@ -1327,7 +1340,7 @@ component accessors="true" {
1327
1340
}
1328
1341
1329
1342
/**
1330
- * Send a new request based on the redirect response recieved .
1343
+ * Send a new request based on the redirect response received .
1331
1344
*
1332
1345
* @res The HyperResponse specifying a redirect.
1333
1346
*
@@ -1508,6 +1521,9 @@ component accessors="true" {
1508
1521
return variables .pathPatternMatcher ;
1509
1522
}
1510
1523
1524
+ /**
1525
+ * Gets the version of hyper being used and also stores it in the application scope.
1526
+ */
1511
1527
public string function getHyperVersion () {
1512
1528
if ( ! structKeyExists ( application , " hyperVersion" ) ) {
1513
1529
application .hyperVersion = deserializeJSON ( fileRead ( expandPath ( " /hyper/box.json" ) ) ).version ;
0 commit comments