Skip to content

janis-commerce/app-request

Repository files navigation

@janiscommerce/app-request

janis-logo

This package is intended to help to do requests at Janis Apps.

Installation

npm i @janiscommerce/app-request

Usage

import Request from '@janiscommerce/app-request'
import {JANIS_ENV} from 'env.json'


const request = new Request({JANIS_ENV})

// GET to a janis service
const sessionData = await request.get({service: 'picking', namespace: 'session', id: '123'});


// GET (list) to a janis service
const sessionList = await request.list({
				namespace: 'session',
				service: 'picking',
				headers: {page: 3},
				queryParams: {
					filters: {sessionOwnershipVisibility, pickingPointId: activeWarehouseId},
					sort: sessionSortingCriteria,
				},
			})


// GET to an external endpoint

const data = await request.get({endpoint: 'https://url.external/userdata/123'})

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •