Skip to content

Commit 51321eb

Browse files
author
James Brundage
committed
feat: HttpListenerRequest.get_XHR ( Fixes #1120 )
1 parent 842e1aa commit 51321eb

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

Types/HttpListener/Request/Alias.psd1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
HostHeader = 'HostName'
44
Subdomains = 'Subdomain'
55
QueryParameters = 'QueryParameter'
6+
XHR = 'IsXmlHttpRequest'
67
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<#
2+
.SYNOPSIS
3+
Determines if the request is an AJAX request.
4+
.DESCRIPTION
5+
Determines if the request was made with XmlHttpRequest.
6+
#>
7+
return ($this.Headers -and
8+
($this.Headers["X-Requested-With"] -eq "XMLHttpRequest"))

0 commit comments

Comments
 (0)