Page MenuHomeSealhub

stdin_query.ts
No OneTemporary

stdin_query.ts

import { Strategy } from "../interfaces/strategy";
import getConfig from "../helpers/get_config";
import axios from "axios";
export class StdinQueryKeyStrategy implements Strategy {
private data: string;
constructor(_data: string) {
this.data = _data;
}
public async readData(): Promise<any> {
const config = await getConfig();
let response;
try {
response = await axios.get(`${config.uri}/api/maniphest.search`, {
data: `api.token=${config.token}&=queryKey=${this.data}`,
});
} catch (_) {
throw new Error("Request failed");
}
return response.data.result;
}
}

File Metadata

Mime Type
text/x-java
Expires
Tue, Feb 25, 00:08 (1 d, 6 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
610140
Default Alt Text
stdin_query.ts (596 B)

Event Timeline