Skip to content

Commit 98053ed

Browse files
committed
feat(HyperRequest): Add asBinary helper method.
1 parent d2ac4a1 commit 98053ed

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

models/HyperRequest.cfc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -941,6 +941,17 @@ component accessors="true" {
941941
return this;
942942
}
943943

944+
/**
945+
* A convenience method to set the body format and Content-Type to xml.
946+
*
947+
* @returns The HyperRequest instance.
948+
*/
949+
function asBinary() {
950+
setBodyFormat( "binary" );
951+
setContentType( "application/octet-stream" );
952+
return this;
953+
}
954+
944955
/**
945956
* Attaches a file to the Hyper request.
946957
* Also sets the Content-Type as `multipart/form-data`.

0 commit comments

Comments
 (0)