mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-21 17:21:09 +01:00
restructured code
This commit is contained in:
@@ -1,53 +0,0 @@
|
||||
# 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
|
||||
|
||||
{}
|
||||
|
||||
###
|
||||
|
||||
### Send GET request with json body by path
|
||||
POST http://localhost:5000/api/spiders/5c63a2ddb65d151bee71d76b/crawl
|
||||
Content-Type: application/json
|
||||
|
||||
{}
|
||||
|
||||
###
|
||||
### Send GET request with json body by path
|
||||
GET http://localhost:5000/api/files?path=/Users/yeqing/projects/crawlab
|
||||
Content-Type: application/json
|
||||
|
||||
{}
|
||||
|
||||
###
|
||||
Reference in New Issue
Block a user