web stats
REST client api - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 02-10-2020, 10:19 PM
moon moon is offline
OBX.1 Kenobi
 
Join Date: Aug 2019
Posts: 31
moon is on a distinguished road
Default REST client api

When I was called client REST api and link return as Unauthorized.
After I am searching a while through the forum, told that I needed to invoke the endpoint https://localhost:8443/api/user/_login for firstly.
But when I am invoking https://localhost:8443/api/user/_log...password=admin, link return also unauthorized.

How can I invoke that login endpoint?
Reply With Quote
  #2  
Old 02-11-2020, 12:00 AM
odo odo is offline
OBX.3 Kenobi
 
Join Date: Feb 2017
Location: Luxembourg
Posts: 165
odo is on a distinguished road
Default

You have to use a post request instead of a get request.
Reply With Quote
  #3  
Old 02-11-2020, 02:25 AM
moon moon is offline
OBX.1 Kenobi
 
Join Date: Aug 2019
Posts: 31
moon is on a distinguished road
Default

Here is my error screenshot.
I am using mirth ver 3.8.1
Attached Images
File Type: png error.PNG (12.0 KB, 13 views)
Reply With Quote
  #4  
Old 02-11-2020, 06:04 AM
odo odo is offline
OBX.3 Kenobi
 
Join Date: Feb 2017
Location: Luxembourg
Posts: 165
odo is on a distinguished road
Default

As I said above, this is because you used a get request (=parameters in URL) instead of a post request (=parameters in request body):

Quote:
Both GET and POST method is used to transfer data from client to server in HTTP protocol.

Main difference between POST and GET method is that GET carries request parameter appended in URL string while POST carries request parameter in message body which makes it more secure way of transferring data from client to server in http protocol.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 12:10 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation