@ -1,7 +1,7 @@
#!/usr/bin/python
#!/usr/bin/python
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
# (c) 2015, Corwin Brown <corwin .brown@maxpoint .com>
# (c) 2015, Corwin Brown <corwin @corwinbrown .com>
#
#
# This file is part of Ansible
# This file is part of Ansible
#
#
@ -27,7 +27,7 @@ module: win_uri
version_added : " 2.1 "
version_added : " 2.1 "
short_description : Interacts with webservices .
short_description : Interacts with webservices .
description :
description :
- Interacts with HTTP and HTTPS services.
- Interacts with HTTP and HTTPS web services and supports Digest , Basic and WSSE HTTP authentication mechanism s.
options :
options :
url :
url :
description :
description :
@ -55,7 +55,7 @@ options:
- The body of the HTTP request / response to the web service .
- The body of the HTTP request / response to the web service .
headers :
headers :
description :
description :
- Key Value pairs for headers . Example " Host: www.somesite.com "
- ' Key Value pairs for headers. Example " Host: www.somesite.com " '
use_basic_parsing :
use_basic_parsing :
description :
description :
- This module relies upon ' Invoke-WebRequest ' , which by default uses the Internet Explorer Engine to parse a webpage . There ' s an edge-case where if a user hasn ' t run IE before , this will fail . The only advantage to using the Internet Explorer praser is that you can traverse the DOM in a powershell script . That isn ' t useful for Ansible, so by default we toggle ' UseBasicParsing ' . However, you can toggle that off here.
- This module relies upon ' Invoke-WebRequest ' , which by default uses the Internet Explorer Engine to parse a webpage . There ' s an edge-case where if a user hasn ' t run IE before , this will fail . The only advantage to using the Internet Explorer praser is that you can traverse the DOM in a powershell script . That isn ' t useful for Ansible, so by default we toggle ' UseBasicParsing ' . However, you can toggle that off here.
@ -81,7 +81,7 @@ EXAMPLES = """
url : http : / / my . internal . server . com
url : http : / / my . internal . server . com
method : GET
method : GET
headers :
headers :
host : " www.somesite.com
host : " www.somesite.com "
# Do a HEAD request on an endpoint
# Do a HEAD request on an endpoint
- - -
- - -
@ -120,27 +120,27 @@ use_basic_parsing:
returned : always
returned : always
type : bool
type : bool
sample : True
sample : True
StatusC ode:
status_c ode:
description : The HTTP Status Code of the response .
description : The HTTP Status Code of the response .
returned : success
returned : success
type : int
type : int
sample : 200
sample : 200
StatusD escription:
status_d escription:
description : A summery of the status .
description : A summery of the status .
returned : success
returned : success
type : string
type : string
stample : " OK "
stample : " OK "
RawC ontent:
raw_c ontent:
description : The raw content of the HTTP response .
description : The raw content of the HTTP response .
returned : success
returned : success
type : string
type : string
sample : ' HTTP/1.1 200 OK \n X-XSS-Protection: 1; mode=block \n X-Frame-Options: SAMEORIGIN \n Alternate-Protocol: 443:quic,p=1 \n Alt-Svc: quic= " www.google.com:443 " ; ma=2592000; v= " 30,29,28,27,26,25 " ,quic= " :443 " ; ma=2... '
sample : ' HTTP/1.1 200 OK \n X-XSS-Protection: 1; mode=block \n X-Frame-Options: SAMEORIGIN \n Alternate-Protocol: 443:quic,p=1 \n Alt-Svc: quic= " www.google.com:443 " ; ma=2592000; v= " 30,29,28,27,26,25 " ,quic= " :443 " ; ma=2... '
H eaders:
h eaders:
description : The Headers of the response .
description : The Headers of the response .
returned : success
returned : success
type : dict
type : dict
sample : { " Content-Type " : " application/json " }
sample : { " Content-Type " : " application/json " }
RawContentL ength:
raw_content_l ength:
description : The byte size of the response .
description : The byte size of the response .
returned : success
returned : success
type : int
type : int