0.0.1 • Published 7 months ago

insomnia-plugin-pre-url v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
7 months ago

Installation

Install the insomnia-plugin-pre-url plugin from Preferences > Plugins.

Usage

You can define the base variable

  • url: the base domain url, like "https://www.xxxx.com"(required)
  • tokenUrl: get token domain url, like "https://token.xxxx.com"
  • tokenApi: get token api, like "get/token"
  • serviceName: subdomain, like "subdomain"
  • isLocal: is local environment
{
	"url": "https://www.xxxx.com",
	"tokenUrl": "https://token.xxxx.com",
	"tokenApi": "get/token",
	"serviceName": "subdomain",
	"isLocal":false
}

You can get different full api through different environment

api: "/api"
method: "get"
Local environment
{
	"url": "http://localhost:8080",
	"tokenUrl": "https://dev-token.xxxx.com",
	"tokenApi": "get/token",
	"serviceName": "subdomain",
	"isLocal":true
}
Full api: "http://localhost:8080/api"
Dev environment
{
	"url": "https://dev.xxxx.com",
	"tokenUrl": "https://dev-token.xxxx.com",
	"tokenApi": "get/token",
	"serviceName": "subdomain",
	"isLocal":false
}
Full api: "https://dev.xxxx.com/subdomain/api"
Live environment
{
	"url": "https://live.xxxx.com",
	"tokenUrl": "https://live-token.xxxx.com",
	"tokenApi": "get/token",
	"serviceName": "subdomain",
	"isLocal":false
}
Full api: "https://live.xxxx.com/subdomain/api"

Scope

  • Pre handle domain url through environment variable
0.0.1

7 months ago