Announcement

Collapse

Mirth Connect 4.1.0 Released!

Mirth Connect 4.1.0 is now available as an appliance update and on our GitHub page. Mirth Connect 4.1.0 includes new features such as new event log messages, additional fields to the Welcome to Mirth Connect screen, new information included in alerts as well as many smaller changes, updates, and improvements. This release also contains several improvements to commercial extensions. See the release notes for the list of fixes and updates.

Download | See What's New | Upgrade Guide | Release Notes

For discussion on this release, see this thread.
See more
See less

Restful Help?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Restful Help?

    I am able to get mirth to use the post method and send a parameter to a restful resource without error and my parameters come across like this:

    Code:
    Parameters: {"name"=>"PATIENT MF", "format"=>"xml", "action"=>"create", "controller"=>"players"}
    However, im using this against a rails app and it is expecting a "nested" parameter of sorts like the below which was generated with RESTClient2.2 (and works):

    Code:
    Parameters: {"player"=>{"name"=>"PATIENT MF" }, "format"=>"xml", "action"=>"create", "controller"=>"players"}
    Is there a way to craft my name value pairs to have it resemble the request above ?

    I tried coming this forum a bit and older mirth version tricks such as mapping the whole xml doc to a variable do not work for me... though this is an ok alternative to just post the whole xml doc which looks nothing more than the below:


    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    
      <player>
        <name>Ron Sweeney</name>
        
      </player>
    And no, im not using Mirth against a fantasy football league jbartels !

  • #2
    Re:Restful Help?

    The parameter nesting you're seeing is not an HTTP thing, its a Rails-ism.

    Pass your params like this:

    Code:
    player[name]=smitty
    and rails turns it into:

    Code:
    :«»player => {:name => smitty }
    Post edited by: jbartels, at: 11/20/2008 11:21
    Jon Bartels

    Zen is hiring!!!!
    http://consultzen.com/careers/
    Talented healthcare IT professionals wanted. Engineers to sales to management.
    Good benefits, great working environment, genuinely interesting work.

    Comment

    Working...
    X