parseRequest.d.ts 1.1 KB

123456789101112131415161718192021222324
  1. /**
  2. * parses request object and returns java okhttp code snippet for adding request body
  3. *
  4. * @param {Object} requestBody - JSON object representing body of request
  5. * @param {String} indentString - string for indentation
  6. * @param {Boolean} trimFields - indicates whether to trim fields of body
  7. * @returns {String} - code snippet of java okhttp parsed from request object
  8. */
  9. export function parseBody(requestBody: any, indentString: string, trimFields: boolean): string;
  10. /**
  11. * Parses header in Postman-SDK request and returns code snippet of java okhttp for adding headers
  12. *
  13. * @param {Object} request - Postman SDK request object
  14. * @param {String} indentString - indentation for code snippet
  15. * @returns {String} - code snippet for adding headers in java-okhttp
  16. */
  17. export function parseHeader(request: any, indentString: string): string;
  18. /**
  19. * returns content-type of request body if available else returns text/plain as default
  20. *
  21. * @param {Object} request - Postman SDK request object
  22. * @returns {String}- content-type of request body
  23. */
  24. export function parseContentType(request: any): string;