• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

TykTechnologies / tyk / 5453 / 2

Build:
DEFAULT BRANCH: master
Ran 19 Aug 2018 02:48AM UTC
Files 99
Run time 4s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

19 Aug 2018 02:42AM UTC coverage: 60.285% (+0.2%) from 60.059%
LATEST_GO=true

push

travis-ci

web-flow
Add Looping support (#1859)

Looping means calling itself without additional http request. So you can do an advanced URL rewrite, and for example redirect it to another endpoint, by using URL of the following scheme: `tyk://self/path`.

As url you can read it as: `tyk` scheme, `self` domain (current API), and `/path` is a path. You can also provide `?method`  the argument to specify HTTP method name, like GET or POST, for example: `tyk://self/path?method=POST`. By default, it matches the same HTTP method as the original request.

Additionally added looping support for VirtualEndpoints. To do so you just need to return HTTP redirect in response: 30X redirect, with Location header containing loop HTTP scheme. Using this technique you can turn VirtualEndpoint into advanced URL rewriter with any logic you want. The same idea will be implemented for the rest of the plugins as well. 

Regarding flow itself, during looping, request retains all its metadata, query params, form values and etc. 

You can chain loops, and turn Tyk into a state machine. Worth noticing that it has protection over too deep stack, and limited by 5 loops in the same request.

Related ticket https://github.com/TykTechnologies/product/issues/86
## Example

The easiest example to follow will be SOAP usage: you receive payloads to the single endpoint, but you want to apply specific transforms, like: different upstreams for different endpoints, or converting XML to JSON, and forwarding to the REST endpoint, and etc. 

On this general SOAP processing endpoint you define advanced URL rewrite which, based on body content, loops user to another Tyk endpoint, for example: if body match `action=“getPrices”`, redirect to `tyk://self/get_prices?method=GET`. 

After you define internal endpoints, for example `get_prices`, and add endpoint specific plugins there.

9481 of 15727 relevant lines covered (60.28%)

0.67 hits per line

Source Files on job 5453.2 (LATEST_GO=true)
  • Tree
  • List 0
  • Changed 8
  • Source Changed 8
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 4972
  • Travis Job 5453.2
  • 0bf374d0 on github
  • Prev Job for LATEST_GO=true on master (#5444.2)
  • Next Job for LATEST_GO=true on master (#5457.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc