All files / output cl_web_http_utility.clas.mjs

30.9% Statements 34/110
100% Branches 2/2
3.03% Functions 1/33
30.9% Lines 34/110

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 1101x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x             1x       1x     1x               1x     1x               1x     1x               1x     1x                   1x     1x                   1x     1x               1x     1x               1x 1x 1x
const {cx_root} = await import("./cx_root.clas.mjs");
// cl_web_http_utility.clas.abap
class cl_web_http_utility {
  static STATIC_SUPER = undefined;
  static INTERNAL_TYPE = 'CLAS';
  static INTERNAL_NAME = 'CL_WEB_HTTP_UTILITY';
  static IMPLEMENTED_INTERFACES = [];
  static ATTRIBUTES = {};
  static METHODS = {"UNESCAPE_URL": {"visibility": "U", "parameters": {"UNESCAPED": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " ", "parm_kind": "R", "type_name": "StringType"}, "ESCAPED": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " ", "parm_kind": "I", "type_name": "StringType"}, "OPTIONS": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " ", "parm_kind": "I", "type_name": "IntegerType"}}},
  "ESCAPE_URL": {"visibility": "U", "parameters": {"ESCAPED": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " ", "parm_kind": "R", "type_name": "StringType"}, "UNESCAPED": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " ", "parm_kind": "I", "type_name": "StringType"}, "OPTIONS": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " ", "parm_kind": "I", "type_name": "IntegerType"}}},
  "DECODE_X_BASE64": {"visibility": "U", "parameters": {"DECODED": {"type": () => {return new abap.types.XString({qualifiedName: "XSTRING"});}, "is_optional": " ", "parm_kind": "R", "type_name": "XStringType"}, "ENCODED": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " ", "parm_kind": "I", "type_name": "StringType"}}},
  "ENCODE_X_BASE64": {"visibility": "U", "parameters": {"ENCODED": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " ", "parm_kind": "R", "type_name": "StringType"}, "UNENCODED": {"type": () => {return new abap.types.XString({qualifiedName: "XSTRING"});}, "is_optional": " ", "parm_kind": "I", "type_name": "XStringType"}}},
  "DECODE_BASE64": {"visibility": "U", "parameters": {"DECODED": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " ", "parm_kind": "R", "type_name": "StringType"}, "ENCODED": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " ", "parm_kind": "I", "type_name": "StringType"}}},
  "ENCODE_BASE64": {"visibility": "U", "parameters": {"ENCODED": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " ", "parm_kind": "R", "type_name": "StringType"}, "UNENCODED": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " ", "parm_kind": "I", "type_name": "StringType"}}},
  "DECODE_UTF8": {"visibility": "U", "parameters": {"UNENCODED": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " ", "parm_kind": "R", "type_name": "StringType"}, "ENCODED": {"type": () => {return new abap.types.XString({qualifiedName: "XSTRING"});}, "is_optional": " ", "parm_kind": "I", "type_name": "XStringType"}}}};
  constructor() {
    this.me = new abap.types.ABAPObject();
    this.me.set(this);
    this.INTERNAL_ID = abap.internalIdCounter++;
    this.FRIENDS_ACCESS_INSTANCE = {
    };
  }
  async constructor_(INPUT) {
    if (super.constructor_) { await super.constructor_(INPUT); }
    return this;
  }
  async decode_utf8(INPUT) {
    return cl_web_http_utility.decode_utf8(INPUT);
  }
  static async decode_utf8(INPUT) {
    let unencoded = new abap.types.String({qualifiedName: "STRING"});
    let encoded = INPUT?.encoded;
    if (encoded?.getQualifiedName === undefined || encoded.getQualifiedName() !== "XSTRING") { encoded = undefined; }
    if (encoded === undefined) { encoded = new abap.types.XString({qualifiedName: "XSTRING"}).set(INPUT.encoded); }
    unencoded.set((await abap.Classes['CL_ABAP_CODEPAGE'].convert_from({source: encoded})));
    return unencoded;
  }
  async decode_base64(INPUT) {
    return cl_web_http_utility.decode_base64(INPUT);
  }
  static async decode_base64(INPUT) {
    let decoded = new abap.types.String({qualifiedName: "STRING"});
    let encoded = INPUT?.encoded;
    if (encoded?.getQualifiedName === undefined || encoded.getQualifiedName() !== "STRING") { encoded = undefined; }
    if (encoded === undefined) { encoded = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.encoded); }
    decoded.set((await abap.Classes['CL_ABAP_CODEPAGE'].convert_from({source: (await abap.Classes['CL_HTTP_UTILITY'].decode_x_base64({encoded: encoded}))})));
    return decoded;
  }
  async encode_base64(INPUT) {
    return cl_web_http_utility.encode_base64(INPUT);
  }
  static async encode_base64(INPUT) {
    let encoded = new abap.types.String({qualifiedName: "STRING"});
    let unencoded = INPUT?.unencoded;
    if (unencoded?.getQualifiedName === undefined || unencoded.getQualifiedName() !== "STRING") { unencoded = undefined; }
    if (unencoded === undefined) { unencoded = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.unencoded); }
    encoded.set((await abap.Classes['CL_HTTP_UTILITY'].encode_x_base64({unencoded: (await abap.Classes['CL_ABAP_CODEPAGE'].convert_to({source: unencoded}))})));
    return encoded;
  }
  async unescape_url(INPUT) {
    return cl_web_http_utility.unescape_url(INPUT);
  }
  static async unescape_url(INPUT) {
    let unescaped = new abap.types.String({qualifiedName: "STRING"});
    let escaped = INPUT?.escaped;
    if (escaped?.getQualifiedName === undefined || escaped.getQualifiedName() !== "STRING") { escaped = undefined; }
    if (escaped === undefined) { escaped = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.escaped); }
    let options = new abap.types.Integer({qualifiedName: "I"});
    if (INPUT && INPUT.options) {options.set(INPUT.options);}
    unescaped.set((await abap.Classes['CL_HTTP_UTILITY'].if_http_utility$unescape_url({escaped: escaped, options: options})));
    return unescaped;
  }
  async escape_url(INPUT) {
    return cl_web_http_utility.escape_url(INPUT);
  }
  static async escape_url(INPUT) {
    let escaped = new abap.types.String({qualifiedName: "STRING"});
    let unescaped = INPUT?.unescaped;
    if (unescaped?.getQualifiedName === undefined || unescaped.getQualifiedName() !== "STRING") { unescaped = undefined; }
    if (unescaped === undefined) { unescaped = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.unescaped); }
    let options = new abap.types.Integer({qualifiedName: "I"});
    if (INPUT && INPUT.options) {options.set(INPUT.options);}
    escaped.set((await abap.Classes['CL_HTTP_UTILITY'].if_http_utility$escape_url({unescaped: unescaped})));
    return escaped;
  }
  async decode_x_base64(INPUT) {
    return cl_web_http_utility.decode_x_base64(INPUT);
  }
  static async decode_x_base64(INPUT) {
    let decoded = new abap.types.XString({qualifiedName: "XSTRING"});
    let encoded = INPUT?.encoded;
    if (encoded?.getQualifiedName === undefined || encoded.getQualifiedName() !== "STRING") { encoded = undefined; }
    if (encoded === undefined) { encoded = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.encoded); }
    decoded.set((await abap.Classes['CL_HTTP_UTILITY'].decode_x_base64({encoded: encoded})));
    return decoded;
  }
  async encode_x_base64(INPUT) {
    return cl_web_http_utility.encode_x_base64(INPUT);
  }
  static async encode_x_base64(INPUT) {
    let encoded = new abap.types.String({qualifiedName: "STRING"});
    let unencoded = INPUT?.unencoded;
    if (unencoded?.getQualifiedName === undefined || unencoded.getQualifiedName() !== "XSTRING") { unencoded = undefined; }
    if (unencoded === undefined) { unencoded = new abap.types.XString({qualifiedName: "XSTRING"}).set(INPUT.unencoded); }
    encoded.set((await abap.Classes['CL_HTTP_UTILITY'].encode_x_base64({unencoded: unencoded})));
    return encoded;
  }
}
abap.Classes['CL_WEB_HTTP_UTILITY'] = cl_web_http_utility;
export {cl_web_http_utility};