Skip to content

Add a Google App Script (UrlFetchApp) code generator #447

@rayliuca

Description

@rayliuca

Is your feature request related to a problem? Please describe.
No code generator is compatible with Google Apps Script and GAS doesn't support regular JS libraries regarding API requests

Describe the solution you'd like
Implement postman code generation for UrlFetchApp

Additional context
An issue on the postman-app-support:
postmanlabs/postman-app-support#3298

My implementation:
https://github.com/rayliuca/postman-code-generators/tree/develop/codegens/js-urlfetchapp

My implementation is based on the javascript-xhr code generator, but do note that the UrlFetchApp class is non-existent on node.js so it is impossible to run the newman tests. I adapted the unit tests from the xhr variant and manually tested the generated codes on GAS to make sure it has most of the common functionalities.

Snippets:
https://github.com/rayliuca/postman-code-generators/tree/develop/codegens/js-urlfetchapp/unitTestSnippets

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions