HTTPRequest Beginner, Getting 404 error

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
cf1flyboy
Newbie
Posts: 7
Joined: Thu Nov 17, 2016 4:21 pm

HTTPRequest Beginner, Getting 404 error

Post by cf1flyboy » Fri Mar 10, 2017 1:00 pm

This is my first time doing HTTPRequest, and I am getting a 404 Error connecting to host
I got a sample, but must not be formatting my request right.
Any Suggestions??

My Code:

Code: Select all

Let>PostData=-H "Content-type:application/json" -d "{'getallprices':{'date':'2/27/2017'}}"
HTTPRequest>https://lmpapidev.ohio.gov:2601/api/getallprices -u yourUserName: yourPassword,,POST,PostData,HTMLResponse
Sample:
https://lmpapidev.ohio.gov:2601/api/getallprices -v --ntlm -u yourUserName: yourPassword -H "Content-type:application/json" -X POST -d "{'getallprices':{'date':'2/27/2017'}}"

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: HTTPRequest Beginner, Getting 404 error

Post by Marcus Tettmar » Fri Mar 10, 2017 2:34 pm

You are referencing HTTPS so you will need to enable SSL:

Let>HTTP_SSL=1

You may also need to set the TLS version:

//set TLS to use 1.2
Let>TLS_VER=12

To set TLS version you need the most recent version.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts