parseRequest.d.ts 961 B

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