# Checking HTTP status codes with win\_uri and Ansible 2.4.0.0

**URL:** <https://forum.ansible.com/t/checking-http-status-codes-with-win-uri-and-ansible-2-4-0-0/25637>\
**Category:** Ansible Project\
**Tags:** windows, ubuntu\
**Created:** [September 29, 2017, 6:19am UTC](https://forum.ansible.com/t/checking-http-status-codes-with-win-uri-and-ansible-2-4-0-0/25637 "2017-09-29T06:19:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guillaume\_Belrose](https://avatars.discourse-cdn.com/v4/letter/g/3d9bf3/32.png) [@Guillaume\_Belrose](https://forum.ansible.com/u/Guillaume_Belrose)\
**Post date:** [September 29, 2017, 6:19am UTC](https://forum.ansible.com/t/checking-http-status-codes-with-win-uri-and-ansible-2-4-0-0/25637/1 "2017-09-29T06:19:50Z")

</div>

HI all,

I am running Ansible 2.4.0.0 (on Ubuntu 16.04) and I am talking to Windows hosts via WinRM.

I am using the win\_uri module which can check the status code of the HTTP response, but I can’t get it to work correctly.

For example, if I have a playbook like this:

---

<div class="post-metadata">

**Author:** ![rhysmeister](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/rhysmeister/32/10599_2.png) [@rhysmeister](https://forum.ansible.com/u/rhysmeister)\
**Post date:** [September 29, 2017, 7:00am UTC](https://forum.ansible.com/t/checking-http-status-codes-with-win-uri-and-ansible-2-4-0-0/25637/2 "2017-09-29T07:00:20Z")

</div>

Does the win\_uri module definately support that style of list notation? It’s written in powershell so perhaps not?

The docs seem to suggest so…

---

<div class="post-metadata">

**Author:** ![Guillaume\_Belrose](https://avatars.discourse-cdn.com/v4/letter/g/3d9bf3/32.png) [@Guillaume\_Belrose](https://forum.ansible.com/u/Guillaume_Belrose)\
**Post date:** [September 29, 2017, 12:14pm UTC](https://forum.ansible.com/t/checking-http-status-codes-with-win-uri-and-ansible-2-4-0-0/25637/3 "2017-09-29T12:14:42Z")

</div>

Hi,  
With
