Skip to content

Instantly share code, notes, and snippets.

@colinf
Last active May 25, 2017 14:59
Show Gist options
  • Save colinf/bc6e8f52ea6c403f9537cf231e4a5adf to your computer and use it in GitHub Desktop.
Save colinf/bc6e8f52ea6c403f9537cf231e4a5adf to your computer and use it in GitHub Desktop.
GetHttpHeader ( headers; searchHdr ) =
Let (
[
$hdrCount = ValueCount ( headers );
$nextValue = GetValue ( headers ; 1 );
$nextHdr = Left ( $nextValue ; Length ( searchHdr ) )
];
If ( $nextHdr = searchHdr ;
Right ( $nextValue ; Length ( $nextValue ) - Length ( searchHdr ) - 2 )
;
getHttpHeader (RightValues ( headers ; $hdrCount - 1 ); searchHdr)
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment