(url, body)
| 243 | } |
| 244 | |
| 245 | function taskGetUrl(url, body) { |
| 246 | return { |
| 247 | url: url, |
| 248 | body: body, |
| 249 | headers: { |
| 250 | "Accept": "*/*", |
| 251 | "Accept-Encoding": "gzip, deflate, br", |
| 252 | "Accept-Language": "zh-cn", |
| 253 | "Connection": "keep-alive", |
| 254 | "Content-Type": "application/x-www-form-urlencoded", |
| 255 | "Host": "api.m.jd.com", |
| 256 | "Referer": `https://h5.m.jd.com/active/redrain/index.html?id=${$.activityId}&lng=0.000000&lat=0.000000&sid=&un_area=`, |
| 257 | "Cookie": cookie, |
| 258 | "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") |
| 259 | } |
| 260 | } |
| 261 | } |
| 262 | |
| 263 | function taskPostUrl(function_id, body = body) { |
| 264 | return { |
no test coverage detected