¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Postman to SIMPL


 

Hi guys.

So I'm working with the VAPIX API, and I can get commands to work from postman, but I can't figure out how to format the working commands down to a string I can send out via a TCP client.

How do I format the following very basic example?? This is the raw data out of the postman console

POST /axis-cgi/apidiscovery.cgi HTTP/1.1
Content-Type: application/json
User-Agent: PostmanRuntime/7.34.0
Accept: */*
Postman-Token: c2d76ff9-854d-4daf-81d9-5ed4a8035c99
Host: 10.95.16.11
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Length: 36
?
{
"method": "getSupportedVersions"
}

Thanks in advance
Jim


 

Simpl doesn't support multi-line, so you have to flatten the message down to one line. However HTTP messages MUST be multi-line to be valid syntax. So in Simpl you add a \n for each line. Like so:


POST /axis-cgi/apidiscovery.cgi HTTP/1.1\nContent-Type: application/json\nUser-Agent: PostmanRuntime/7.34.0\nAccept: */*\nPostman-Token: c2d76ff9-854d-4daf-81d9-5ed4a8035c99\nHost: 10.95.16.11\nAccept-Encoding: gzip, deflate, br\nConnection: keep-alive\nContent-Length: 36\n\n{"method": "getSupportedVersions"}\n\n


 

JPCH,
You have the content a bit wrong, with the example he posted it should be:

POST /axis-cgi/apidiscovery.cgi HTTP/1.1\nContent-Type: application/json\nUser-Agent: PostmanRuntime/7.34.0\nAccept: */*\nPostman-Token: c2d76ff9-854d-4daf-81d9-5ed4a8035c99\nHost: 10.95.16.11\nAccept-Encoding: gzip, deflate, br\nConnection: keep-alive\nContent-Length: 36\n\n{\n"method": "getSupportedVersions"\n}

Jim,
You might want to look at your headers and see if they are all required. The only one that I know is a must is Host. I would probably try the string below:

POST /axis-cgi/apidiscovery.cgi HTTP/1.1\nHost: 10.95.16.11\nContent-Length: 36\n\n{\n"method": "getSupportedVersions"\n}

That is unless you want to make sure the connection stays connected, then I would use:

POST /axis-cgi/apidiscovery.cgi HTTP/1.1\nHost: 10.95.16.11\nConnection: keep-alive\nContent-Length: 36\n\n{\n"method": "getSupportedVersions"\n}


 

Big thanks to both of you.? I was flattening them out, but I obviously have some small formatting errors. I'll try these out later this week when I'm back onsite.

Thanks again
J