It would be nice to be able to define a base request
---
base: true
id: base
headers:
host: "{{$ baseUrl}}"
accept: application/json
user-agent: "{{$ userAgent}}"
authorization: "Bearer {{! secretToken}}"
---
extends: base
id: posts/getPosts
description: Get all posts from the blog
http: |+
GET /posts HTTP/1.1
---
Overall
Parsing
Validation
Future
- It would be nice to support base requests defining
http and merging them. Doing this with the verb, target, headers wouldn't be too hard. This will be trickier with body because it will depend on what that body content is. In most cases there won't be a good merge strategy other than prepend or append. Even then which one? Some body content types like application/json could be merged but that's not straight forward and there are different algorithms for that.
It would be nice to be able to define a base request
Overall
[collection, data, baseRequests, ...requests]OR implement restfile objects and let that abstract it.restfile.baseRequestsandrestfile.requestsParsing
Validation
request.extendsreferences requests that exist and markedbase: truerequest.httpshould not be defined on base requestsFuture
httpand merging them. Doing this with the verb, target, headers wouldn't be too hard. This will be trickier with body because it will depend on what that body content is. In most cases there won't be a good merge strategy other than prepend or append. Even then which one? Some body content types likeapplication/jsoncould be merged but that's not straight forward and there are different algorithms for that.