Feedback after using POST service


Is there any way to verify the HTTP POST action being carried out?

url = “
file = “path/to/some/file”, file=file)

For example, right after the above scripting being executed, is there any way to receive the feedback (like the command being executed)?

postAsync returns a Promise object which you can add a callback to. See

If you want to use the result immediately you should probably just use the blocking variant (post).

Using the normal post method like below, is there a way to get the HTTP response code from the reply?

page =, {‘x-aio-key’: aioKey, ‘value’:value})

for example when using python requets, “page.status_code” would give you the HTTP code.



Unfortunately no. Shortcomings like this are one of the things the new API fixes.

Going back to the classic function is not what Kevin was suggesting. Use the .post() method of httpClient–its response object has a .statusCode property.

{ As documented in the link Kevin provided. }

@pturmel @Kevin.Herron

Thanks for your advice, it works brilliantly! I just put a quick example snapshot up in case it can be a helpful reference for anyone else.

1 Like

@Kevin.Herron @nicholas.robinson @pturmel

Thanks for the reply!!! I was away from my laptop for a few days didn’t expect the suggestion to come out so fast. Let me look into this now. Thanks all. Have a nice day and take care.

Hi all, I manage to solve this matter after email to the support team and try it on myself. Attached below is the solution:

Inductive Automation has a knowledge base article on how to you can import python modules.,located%20inside%20the%20installation%20directory.&text=Now%20you%20are%20ready%20to,of%20your%20newly%20imported%20library!

You can download the official python 2.7 version of the requests module from this website:

You would need to transfer over the “requests”, “idna”, “certifi”, “chardet”, and “urllib3” folders to the “mylib” Ignition folder to use the requests module.

Once this is completed, you’ll be able to use the python requests module to use the post() method within your scripts and the script console of the Designer.

Below is the script to do so

import requests

headers = {
‘x-api-key’: ’ ',
‘Content-Type’: ‘application/json’,

data = ‘{“Destination”: " ", “Message”: " ", “Priority”: }’

response =‘URL’, headers=headers, data=data, verify=False, auth=(‘username’, ‘password’))