Files
crawlab/test/test.http
Yeqing Zhang 39b687f0d1 added deploys
2019-02-13 20:53:15 +08:00

38 lines
1.2 KiB
HTTP

# For a quick start check out our HTTP Requests collection (Tools|HTTP Client|Open HTTP Requests Collection).
#
# Following HTTP Request Live Templates are available:
# * 'gtrp' and 'gtr' create a GET request with or without query parameters;
# * 'ptr' and 'ptrp' create a POST request with a simple or parameter-like body;
# * 'mptr' and 'fptr' create a POST request to submit a form with a text or file field (multipart/form-data);
### Send PUT request with json body
PUT http://localhost:5000/api/spiders
Content-Type: application/json
{
"spider_name": "baidu spider",
"cmd": "python /Users/yeqing/projects/crawlab/spiders/baidu/baidu.py",
"src": "/Users/yeqing/projects/crawlab/spiders/baidu/baidu.py",
"spider_type": 1,
"lang_type": 1
}
### Send POST request with json body
POST http://localhost:5000/api/spiders/5c63a2ddb65d151bee71d76b
Content-Type: application/json
{
"spider_name": "baidu spider",
"cmd": "/Users/yeqing/projects/crawlab/spiders/baidu/baidu.py",
"src": "/Users/yeqing/projects/crawlab/spiders/baidu/baidu.py",
"spider_type": 1,
"lang_type": 1
}
### Send POST request with json body by path
POST http://localhost:5000/api/spiders/5c63a2ddb65d151bee71d76b/crawl
Content-Type: application/json
{}
###