# Issue posting XML Call

**URL:** <https://forum.inductiveautomation.com/t/issue-posting-xml-call/90709>\
**Category:** Ignition\
**Created:** [May 21, 2024, 9:15pm UTC](https://forum.inductiveautomation.com/t/issue-posting-xml-call/90709 "2024-05-21T21:15:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alex.chmelka](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alex.chmelka/32/26672_2.png) [@alex.chmelka](https://forum.inductiveautomation.com/u/alex.chmelka)\
**Post date:** [May 21, 2024, 9:15pm UTC](https://forum.inductiveautomation.com/t/issue-posting-xml-call/90709/1 "2024-05-21T21:15:57Z")

</div>

I'm having issues using system.net.httpPost using an XML string. I have verified my string works when copied and pasted into Insomnia, so syntax is not an issue. The return code gives me the following:

`﻿Action 'Transform XML using XSLT-<Custom parameter>' did not complete. Details: Data at the root level is invalid. Line 1, position 1.`

I have not been able to get anything other than this error, even when attempting to put the most basic xml data. For example, this gives me the same data.

```python
testNoData = """<?xml version="1.0" encoding="utf-8"?>"""
returnInfo = system.net.httpPost(url=hostUrl,contentType = 'text/xml',postParams=testNoData)	

```

Has anyone run into this error before? I've searched around extensively and it generally seems to be a potential hidden character or string type issue. Thanks for any help.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [May 21, 2024, 9:25pm UTC](https://forum.inductiveautomation.com/t/issue-posting-xml-call/90709/2 "2024-05-21T21:25:10Z")

</div>

`postParams` isn't the name of the parameter you're looking for, it's `postData`.

Also - obligatory reccomendation that you should be using `system.net.httpClient` instead.

---

<div class="post-metadata">

**Author:** ![alex.chmelka](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alex.chmelka/32/26672_2.png) [@alex.chmelka](https://forum.inductiveautomation.com/u/alex.chmelka)\
**Post date:** [May 21, 2024, 9:26pm UTC](https://forum.inductiveautomation.com/t/issue-posting-xml-call/90709/3 "2024-05-21T21:26:52Z")

</div>

Oh my goodness, thanks. I have only used json up to now. And I will switch to the client method instead.
