support `Resto` file
abdfnx opened this issue · 4 comments
abdfnx commented
it's an great idea to support resto
file, but why ?
- Send requests from files easily
- Save time
- a New Feature
so I choose yaml
as the file format and the file name is .resto.yml
example
method: "POST"
url: "https://api.spacex.land/graphql"
contentType: "application/graphql"
openBodyEditor: true
# if `openBodyEditor` is false
body: |
query {
launchesPast(limit: 2) {
mission_name
launch_date_local
launch_site {
site_name_long
}
links {
article_link
video_link
}
rocket {
rocket_name
first_stage {
cores {
flight
core {
reuse_count
status
}
}
}
second_stage {
payloads {
payload_type
payload_mass_kg
payload_mass_lbs
}
}
}
ships {
name
home_port
image
}
}
}
authType: "Bearer"
token: "MY_TOKEN"
# or basic auth
username: "USERNAME"
password: "P@$$w0rd"
that's it 👍
david-tomson commented
hmm, I like it, it's sounds a great idea, so let's work on it
Timothee-Cardoso commented
what about create our own file? like Dockerfile
or Jenkinsfile
maybe Restofile
is nice
example
request {
method "POST"
url "https://api.spacex.land/graphql"
contentType "application/graphql"
}
body {
openBodyEditor "true"
# if `openBodyEditor` prop is false or not set
readFrom "PATH_TO_FILE"
}
auth {
type "bearer"
token: "MY_TOKEN"
# or basic auth
type "basic"
username: "USERNAME"
password: "P@$$w0rd"
# to use from env variable
password "env:MY_PASSWORD"
}
and we can add support for headers
abdfnx commented
@Timothee-Cardoso yeah it's awesome. I think Restofile
is great, The decision was made **we'll support Restofile
with our rolls
abdfnx commented
we did it, thanks for your work