MCPcopy Create free account
hub / github.com/smallfawn/QLScriptPublic / taskRequest

Method taskRequest

ruilanCar.js:45–76  ·  view source on GitHub ↗
(method, url, body = "")

Source from the content-addressed store, hash-verified

43
44 }
45 async taskRequest(method, url, body = "") {
46 //
47 let headers = {
48 "user-agent": "Dart/2.19 (dart:io)",
49 "x-app-id": "fVbEaznM",
50 "service-version": "2.16.5",
51 "accept-encoding": "gzip",
52 "aid": this.aid,
53 "content-type": "application/json",
54 "signinsource": "client_ios",
55 "version": "",
56 //"content-length": "33",
57 "rid": this.rid,
58 "host": "api-gateway.livanauto.com",
59 "x-timestamp": Date.now(),
60 "x-sequence-no": "q193JPARcnfIVizYzt3IZ"
61 }
62 const reqeuestOptions = {
63 url: url,
64 method: method,
65 headers: headers
66 }
67 if (method !== "get") {
68 if (headers["Content-Type"] == "application/json") {
69 reqeuestOptions["body"] = JSON.stringify(body);
70 } else {
71 reqeuestOptions["body"] = body
72 }
73 }
74 let { body: result } = await $.httpRequest(reqeuestOptions)
75 return result
76 }
77 async essay_list() {
78 let result = await this.taskRequest("get", `https://api-gateway.livanauto.com/app/v1.0/appapi/content/subject/appSubject?current=1&subjectId=36&essayCurrent=1&pageSize=20`)
79 if (result.code == 0) {

Callers 5

essay_listMethod · 0.95
content_listMethod · 0.95
user_infoMethod · 0.95
task_shareMethod · 0.95
task_likeMethod · 0.95

Calls 1

httpRequestMethod · 0.45

Tested by

no test coverage detected