chore: README, builder scaffolding and some example collection

idk where I found the collection, credits should be given, I'm a bad
person
This commit is contained in:
əlemi 2023-06-07 15:32:23 +02:00
parent 97505bbd86
commit c2fadf1f62
Signed by: alemi
GPG key ID: A4895B84D311642C
3 changed files with 108 additions and 0 deletions

1
README.md Normal file
View file

@ -0,0 +1 @@
# PostWoman

96
sample_collection.json Normal file
View file

@ -0,0 +1,96 @@
{
"variables": [],
"info": {
"name": "Sample Postman Collection",
"_postman_id": "35567af6-6b92-26c2-561a-21fe8aeeb1ea",
"description": "A sample collection to demonstrate collections as a set of related requests",
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
},
"item": [
{
"name": "Newman: GET request",
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"pm.test('expect response be 200', function () {",
" pm.response.to.be.ok",
"})",
"pm.test('expect response json contain args', function () {",
" pm.expect(pm.response.json().args).to.have.property('source')",
" .and.equal('newman-sample-github-collection')",
"})"
]
}
}
],
"request": {
"url": {
"raw": "https://postman-echo.com/get?source=newman-sample-github-collection",
"protocol": "https",
"host": [
"postman-echo",
"com"
],
"path": [
"get"
],
"query": [
{
"key": "source",
"value": "newman-sample-github-collection",
"equals": true,
"description": ""
}
],
"variable": []
},
"method": "GET",
"header": [],
"body": {},
"description": ""
},
"response": []
},
{
"name": "Newman: POST request",
"request": {
"url": "https://postman-echo.com/post",
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"body": {
"mode": "raw",
"raw": "Duis posuere augue vel cursus pharetra. In luctus a ex nec pretium..."
},
"description": ""
},
"response": []
},
{
"name": "Newman: POST request with JSON body",
"request": {
"url": "https://postman-echo.com/post",
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\"text\":\"Duis posuere augue vel cursus pharetra. In luctus a ex nec pretium...\"}"
},
"description": ""
},
"response": []
}
]
}

11
src/builder.rs Normal file
View file

@ -0,0 +1,11 @@
use clap::Subcommand;
use crate::proto::{Header, Item, Request};
impl PostWomanActions {
pub async fn build(&self) -> Item {
match self {
}
}
}