Adds http requests
This commit is contained in:
parent
b4fddfb55b
commit
f9266a6efc
4 changed files with 86 additions and 0 deletions
21
tests/http_requests/comment-request.http
Normal file
21
tests/http_requests/comment-request.http
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
# 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);
|
||||||
|
POST https://comments.lbry.com/api
|
||||||
|
Content-Type: application/json
|
||||||
|
|
||||||
|
{
|
||||||
|
"jsonrpc": "2.0",
|
||||||
|
"id": null,
|
||||||
|
"method": "get_claim_comments",
|
||||||
|
"params": {
|
||||||
|
"claim_id": "9cb713f01bf247a0e03170b5ed00d5161340c486"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
###
|
23
tests/http_requests/create-comment.http
Normal file
23
tests/http_requests/create-comment.http
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
# 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);
|
||||||
|
POST https://comments.lbry.com/api
|
||||||
|
Content-Type: application/json
|
||||||
|
|
||||||
|
{
|
||||||
|
"jsonrpc": "2.0",
|
||||||
|
"id": null,
|
||||||
|
"method": "create_comment",
|
||||||
|
"params": {
|
||||||
|
"comment": "this comment is persistent",
|
||||||
|
"claim_id": "9cb713f01bf247a0e03170b5ed00d5161340c486",
|
||||||
|
"channel_name": "@dogeworld",
|
||||||
|
"channel_id": "9cb713f01bf247a0e03170b5ed00d5161340c486"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
###
|
||||||
|
|
22
tests/http_requests/create_comment_local.http
Normal file
22
tests/http_requests/create_comment_local.http
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
# 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);
|
||||||
|
POST http://localhost:5921/api
|
||||||
|
Content-Type: application/json
|
||||||
|
|
||||||
|
{
|
||||||
|
"jsonrpc": "2.0",
|
||||||
|
"id": null,
|
||||||
|
"method": "create_comment",
|
||||||
|
"params": {
|
||||||
|
"claim_id": "9cb713f01bf247a0e03170b5ed00d5161340c486",
|
||||||
|
"comment": "This is literally, the most anonymous comment I have EVER seen.",
|
||||||
|
"channel_id": "9cb713f01bf247a0e03170b5ed00d5161340c486",
|
||||||
|
"channel_name": "@do oge world "
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
###
|
20
tests/http_requests/local-server-request.http
Normal file
20
tests/http_requests/local-server-request.http
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
# 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);
|
||||||
|
POST http://localhost:5921/api
|
||||||
|
Content-Type: application/json
|
||||||
|
|
||||||
|
{
|
||||||
|
"jsonrpc": "2.0",
|
||||||
|
"id": null,
|
||||||
|
"method": "get_claim_comments",
|
||||||
|
"params": {
|
||||||
|
"claim_id": "9cb713f01bf247a0e03170b5ed00d5161340c486",
|
||||||
|
"page": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
###
|
Loading…
Reference in a new issue