How would you call a REST service from a Mendix 8 native app?

0
In a hybrid app, I could just use the “Call REST service” activity in a microflow, but this is not allowed in a nanoflow. What would be a good way to do so from a native app?
asked
2 answers
4

As of the current version of Mendix (8.1.1), this would require a JavaScript action to accomplish in a native app. We’ll see a method to handle this out of the box in the near future.

answered
0

building a react widget and call api via 

import React, { Component } from 'react'

class App extends Component { ... componentDidMount() {           fetch('http://jsonplaceholder.typicode.com/users')

     .then(res => res.json())

     .then((data) => { this.setState({ contacts: data }) })

     .catch(console.log) }

     // More code here. 

}

answered