Skip to content

Extended targets language

Compare
Choose a tag to compare
@tsenart tsenart released this 16 Nov 12:04
· 467 commits to master since this release

This release extends the targets language to support custom per-target headers and bodies in a fully backwards compatible way.

Simple targets

GET http://goku:9090/path/to/dragon?item=balls
GET http://user:password@goku:9090/path/to
HEAD http://goku:9090/path/to/success

Targets with custom headers

GET http://user:password@goku:9090/path/to
X-Account-ID: 8675309

DELETE http://goku:9090/path/to/remove
Confirmation-Token: 90215
Authorization: Token DEADBEEF

Targets with custom bodies

POST http://goku:9090/things
@/path/to/newthing.json

PATCH http://goku:9090/thing/71988591
@/path/to/thing-71988591.json

Targets with custom bodies and headers

POST http://goku:9090/things
X-Account-ID: 99
@/path/to/newthing.json

Shout out to @cwinters for sparking up this discussion and contributing to the implementation.