Skip to content

Commit 1ba168b

Browse files
authored
docs: Updated misspelled and missing docblocks
1 parent c96d16e commit 1ba168b

File tree

3 files changed

+29
-11
lines changed

3 files changed

+29
-11
lines changed

models/CfhttpHttpClient.cfc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ component implements="HyperHttpClientInterface" {
7676
attrCollection[ "workstation" ] = req.getWorkStation();
7777
}
7878

79-
// this is only necessarry for NTLM authType, BASIC is the default
79+
// this is only necessary for NTLM authType, BASIC is the default
8080
if ( len( req.getAuthType() ) && len( req.getUsername() ) ) {
8181
attrCollection[ "authType" ] = req.getAuthType();
8282
}
@@ -222,7 +222,7 @@ component implements="HyperHttpClientInterface" {
222222
attrCollection[ "workstation" ] = req.getWorkStation();
223223
}
224224

225-
// this is only necessarry for NTLM authType, BASIC is the default
225+
// this is only necessary for NTLM authType, BASIC is the default
226226
if ( len( req.getAuthType() ) && len( req.getUsername() ) ) {
227227
attrCollection[ "authType" ] = req.getAuthType();
228228
}

models/HyperRequest.cfc

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,12 @@ component accessors="true" {
118118
property name="headers";
119119

120120
/**
121-
* A struct of headers for the request.
121+
* A struct of cookies for the request.
122122
*/
123123
property name="cookies";
124124

125125
/**
126-
* A struct of query parameters for the request.
126+
* An array of query parameters for the request.
127127
*/
128128
property name="queryParams";
129129

@@ -194,6 +194,8 @@ component accessors="true" {
194194
/**
195195
* Initialize a new HyperRequest.
196196
*
197+
* @httpClient The HTTP client to use for the request. Must implement HyperHttpClientInterface.
198+
*
197199
* @returns The HyperRequest instance.
198200
*/
199201
function init( httpClient = new CfhttpHttpClient() ) {
@@ -598,7 +600,7 @@ component accessors="true" {
598600
}
599601

600602
/**
601-
* Gets the first value for a certian query parameter.
603+
* Gets the first value for a certain query parameter.
602604
* @deprecated Use `getQueryParamByName`
603605
*
604606
* @name The name of the query parameter to retrieve its value.
@@ -611,7 +613,7 @@ component accessors="true" {
611613
}
612614

613615
/**
614-
* Gets the first value for a certian query parameter.
616+
* Gets the first value for a certain query parameter.
615617
*
616618
* @name The name of the query parameter to retrieve its value.
617619
*
@@ -629,7 +631,7 @@ component accessors="true" {
629631
}
630632

631633
/**
632-
* Get all the values for a certian query parameter.
634+
* Get all the values for a certain query parameter.
633635
*
634636
* @name The name of the query parameter to retrieve all of its values.
635637
*
@@ -713,7 +715,7 @@ component accessors="true" {
713715
/**
714716
* Add additional cookies to the request.
715717
*
716-
* @headers A struct of cookies to add to the request.
718+
* @cookies A struct of cookies to add to the request.
717719
*
718720
* @returns The HyperRequest instance.
719721
*/
@@ -984,7 +986,7 @@ component accessors="true" {
984986
/**
985987
* A convenience method to set the User-Agent header.
986988
*
987-
* @type The User-Agent value for the request.
989+
* @userAgent The User-Agent value for the request.
988990
*
989991
* @returns The HyperRequest instance.
990992
*/
@@ -1034,6 +1036,8 @@ component accessors="true" {
10341036
* Returns the full url for the request.
10351037
* Combines the baseURL, the URL, and the serialized queryParams.
10361038
*
1039+
* @withQueryString Whether to include the query string in the full url.
1040+
*
10371041
* @returns The full url for the request.
10381042
*/
10391043
function getFullUrl( withQueryString = false ) {
@@ -1208,6 +1212,15 @@ component accessors="true" {
12081212
return this;
12091213
}
12101214

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+
* @returns The HyperRequest instance.
1223+
*/
12111224
public HyperRequest function retry(
12121225
required any attempts,
12131226
numeric delay,
@@ -1327,7 +1340,7 @@ component accessors="true" {
13271340
}
13281341

13291342
/**
1330-
* Send a new request based on the redirect response recieved.
1343+
* Send a new request based on the redirect response received.
13311344
*
13321345
* @res The HyperResponse specifying a redirect.
13331346
*
@@ -1508,6 +1521,9 @@ component accessors="true" {
15081521
return variables.pathPatternMatcher;
15091522
}
15101523

1524+
/**
1525+
* Gets the version of hyper being used and also stores it in the application scope.
1526+
*/
15111527
public string function getHyperVersion() {
15121528
if ( !structKeyExists( application, "hyperVersion" ) ) {
15131529
application.hyperVersion = deserializeJSON( fileRead( expandPath( "/hyper/box.json" ) ) ).version;

models/HyperResponse.cfc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,11 @@ component accessors="true" {
6767
* @executionTime The execution time of the request, in milliseconds.
6868
* @charset The response charset. Default: UTF-8
6969
* @statusCode The response status code. Default: 200.
70+
* @statusText The response status text. Default: OK.
7071
* @headers The response headers. Default: {}.
7172
* @data The response data. Default: "".
7273
* @timestamp The timestamp for when this response was received. Default: `now()`.
74+
* @responseID Unique response ID representing this response. Default: `createUUID()`.
7375
*
7476
* @returns A new HyperResponse instance.
7577
*/
@@ -214,7 +216,7 @@ component accessors="true" {
214216
}
215217

216218
/**
217-
* Returns true if the request status code is considered a server error.
219+
* Returns true if the request status code is considered a server error (5xx status code).
218220
*
219221
* @returns boolean
220222
*/

0 commit comments

Comments
 (0)