Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker.

Consume Remote API Data From Within A Node.js Application

Not too long I wrote about consuming remote API data using Golang. However, as you know, I’m also a heavy Node.js developer as well. So how do we issue HTTP requests from within a Node.js application and why might you want to. The simple answer is that you might want to consume someone else’s data within your web application and you can’t just do that like you would in a browser-based application using Ajax or similar.

We’re going to see how to make HTTP requests possible within Node.js.

Read More

Request Android Permissions In NativeScript Using Angular

With every version of Android comes more security measures dropped into place. For example, in Android 6+ the user needs to grant permissions when doing certain activities, such as using the camera. These security measures are more aggressive than the previous form of asking permissions in the manifest file.

So what if we want to prompt the user to grant permissions at a time other than when trying to use the feature that requires the permissions? For example, asking for camera permissions when the application loads, rather than when we try to use the camera feature of the application?

We’re going to see how to request permissions in an Android NativeScript project with Angular.

Read More

Use The HTTP Module Instead Of Fetch In NativeScript

Not too long ago I wrote about using the NativeScript fetch module for making HTTP requests in an Android and iOS mobile application. Personally I find that the fetch module is a bit awkward to use, so this time we’re going to take a look at using the http module instead.

The great thing about the NativeScript http module is that it is pretty much the same as it is in the other languages.

Read More

Make HTTP Requests In An Ionic 2 Android And iOS App

Anyone looking to build a mobile application is going to find themselves needing to make HTTP requests to some remote web service at some time. It is just how the modern web and modern app development process is now. Previously I had demonstrated how to make HTTP requests in an Ionic Framework 1 application, but since Ionic 2 is all the rage right now, we’re going to switch gears and see how it is done in the latest framework version.

The bulk of this tutorial will be demonstrating how to make these web service requests in Angular since it is fairly different from the first AngularJS version.

Read More

Create A Simple RESTful API With Node.js

I’ve written a few tutorials regarding Node.js and the Express.js framework, but I never took a step back and explained how to make a super simple RESTful API for processing HTTP requests from a front-facing interface.

With this API created, you can use it with just about any application that can submit HTTP requests. It is a great way to test a mobile application or one that uses JavaScript frameworks like jQuery, ReactJS, or AngularJS.

Read More

Make HTTP Requests In iOS With React Native

If you’ve been keeping up with my blog, you’ll know I did an article for doing HTTP requests with Ionic Framework. Since I’ve been playing around with React Native a lot lately, I figured it is probably a good idea to figure out how to do RESTful HTTP requests sooner than later since everything has an API back-end now.

The Facebook documentation for React Native has (or had at the time of writing this) a tutorial for getting movie data from a remote API. However, it hardly explained how to customize the HTTP request. In fact, I found that a lot of the internet was missing clear cut documentation for RESTful requests with React.

This article should clear things up!

Read More

Get Remote HTML Data And Parse It In Express For Node.js

Have you ever wanted to fetch remote HTML data in a similar fashion to cURL or Wget using some backend web service and parse it? If you said no, don’t worry, I said the exact thing until I was challenged to do so. For the challenge, I chose to use Express as my framework and a few libraries to assist in the process of fetching and parsing.

I chose to use the HTTP and HTTPS libraries for fetching the data and the htmlparser2 for parsing the HTML data. These are of course only a few of many alternatives to choose from for such a task.

Read More


Follow Us

The Polyglot Developer


Subscribe to the newsletter for monthly tips and tricks on subjects such as mobile, web, and game development.

The Polyglot Developer

Support This Site