Skip to content

kyriba/dev-portal-basic-Java-Postman-App-sample

Repository files navigation

dev-portal-basic-Java-Postman-App-sample

Requirements

Building the client library requires:

  1. Java 1.8 or higher Installation
  2. Gradle Installation
  3. Postman v8 or higher Installation

⚠️ If you also have JRE installed, create a new environment variable for Java and set a new path for the PATH environment to the JDK folder in "Program Files". Guides for creating and setting a new path: Windows / Unix / MacOS.

Installation

To copy the client to your computer copy link of the repository, open Command Prompt, go to the location where project will be copied and execute git clone command:

git clone https://github.com/kyriba/dev-portal-basic-Java-Postman-App-sample.git

Open the project folder via command prompt, for example:

cd dev-portal-basic-Java-Postman-App-sample

Select the desired Collection in Postman, authenticate through "Get token." request and run the request that you want to provide in the Application.

If the request works, copy code from Postman:

code.png

In "Code snippet", proceed to the dropdown list with different programming languages, where "cURL" is set by default, and choose "Java - OkHttp" from the list. There, copy the snippet to clipboard:

copy.png

Open the .../src/main/java/App.java file and input your piece of code:

input.png

Run the project in Terminal in the root folder of cloned app:

gradle run

If everything was done accordingly with provided steps, you will get the result printed in the command prompt.

version compatible with Java compatible with Postman
1.0.0 1.8 or higher v8
1.1.0 1.8 or higher v9 or higher