# throwOnError missing on httpDelete method

**URL:** <https://forum.inductiveautomation.com/t/throwonerror-missing-on-httpdelete-method/76903>\
**Category:** Ignition\
**Created:** [July 25, 2023, 9:24pm UTC](https://forum.inductiveautomation.com/t/throwonerror-missing-on-httpdelete-method/76903 "2023-07-25T21:24:45Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_White](https://avatars.discourse-cdn.com/v4/letter/m/c6cbf5/32.png) [@Michael\_White](https://forum.inductiveautomation.com/u/Michael_White)\
**Post date:** [July 25, 2023, 9:24pm UTC](https://forum.inductiveautomation.com/t/throwonerror-missing-on-httpdelete-method/76903/1 "2023-07-25T21:24:45Z")

</div>

On the `system.net.httpDelete` function, it's missing the keyword argument `throwOnError=True`. This is on other methods such as `httpPost`, but not on delete.

This means I can't get any meaningful information back from the response when the status code of the delete response isn't in the 200 range.

---

<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:** [July 25, 2023, 9:25pm UTC](https://forum.inductiveautomation.com/t/throwonerror-missing-on-httpdelete-method/76903/2 "2023-07-25T21:25:31Z")

</div>

What version of Ignition are you using?

---

<div class="post-metadata">

**Author:** ![Michael\_White](https://avatars.discourse-cdn.com/v4/letter/m/c6cbf5/32.png) [@Michael\_White](https://forum.inductiveautomation.com/u/Michael_White)\
**Post date:** [July 26, 2023, 1:38pm UTC](https://forum.inductiveautomation.com/t/throwonerror-missing-on-httpdelete-method/76903/3 "2023-07-26T13:38:13Z")

</div>

8.1.26

---

<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:** [July 26, 2023, 1:39pm UTC](https://forum.inductiveautomation.com/t/throwonerror-missing-on-httpdelete-method/76903/4 "2023-07-26T13:39:49Z")

</div>

Use system.net.httpClient instead. It’s the indended replacement for the other HTTP scripting functions in 8.x.

The status is available in the response objects from this call.

---

<div class="post-metadata">

**Author:** ![Michael\_White](https://avatars.discourse-cdn.com/v4/letter/m/c6cbf5/32.png) [@Michael\_White](https://forum.inductiveautomation.com/u/Michael_White)\
**Post date:** [July 26, 2023, 2:02pm UTC](https://forum.inductiveautomation.com/t/throwonerror-missing-on-httpdelete-method/76903/5 "2023-07-26T14:02:27Z")

</div>

How can I include post data (not url parameters) and headers with httpClient?

---

<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:** [July 26, 2023, 2:17pm UTC](https://forum.inductiveautomation.com/t/throwonerror-missing-on-httpdelete-method/76903/6 "2023-07-26T14:17:19Z")

</div>

Look under the "JythonHttpClient Methods" section of the docs: [system.net.httpClient - Ignition User Manual 8.1 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC81/system.net.httpClient)

It's the `data` and `headers` parameters.

---

<div class="post-metadata">

**Author:** ![Michael\_White](https://avatars.discourse-cdn.com/v4/letter/m/c6cbf5/32.png) [@Michael\_White](https://forum.inductiveautomation.com/u/Michael_White)\
**Post date:** [July 26, 2023, 2:28pm UTC](https://forum.inductiveautomation.com/t/throwonerror-missing-on-httpdelete-method/76903/7 "2023-07-26T14:28:32Z")

</div>

Thanks, that worked.

Though quick question. I keep getting an error that the URL contains an invalid character. In this case, `|`. The URL in question: `https://dev-redacted.us.auth0.com/api/v2/users/auth0|6468f7bbf0c4adceed59f78c/roles`

Both firefox and curl recognize this as a valid URL without warning. But Ignition throws an error unless I encode that character to '%7C'.

Is that intended behavior?

---

<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:** [July 26, 2023, 2:30pm UTC](https://forum.inductiveautomation.com/t/throwonerror-missing-on-httpdelete-method/76903/8 "2023-07-26T14:30:23Z")

</div>

Hmm, what's the exact error? Java tends to do strict URI syntax checking, while other software will often just treat it as a String and pass it through.

edit: yeah, so "|" isn't a legal character in a URI unless it's encoded, and we aren't doing any URL encoding for you.
