Skip to content

Support for Mikrotik RouterOS's /tool/fetch CLI command (routeros-fetch) #769

Open
@mobileskyfi

Description

@mobileskyfi

I created a new code generator for Mikrotik RouterOS's CLI command /tool fetch url=.... The spec is here: https://help.mikrotik.com/docs/display/ROS/Fetch

Mikrotik makes routers with a powerful scripting langange (.rsc), and supports making web service calls via the /tool/fetch command. But the syntax requires some specific string escapes and OS has a primitive toolchain - so existing Postman code generators like curl or http are pretty far from a cut-and-paste job.

Following the CONTRIBUTING.md guide... I used npm run boilerplate routeros-fetch to create a new one, borrowing code from the http and curl codegens to deal with options/body/headers. I have not looked at the unit/etc tests much yet (and would be before doing pull request) – but the basic of my routers-fetch codegen seem to create working snippet for RouterOS /tool/fetch. At least form the CLI/test code - I'd really like to test my codegen code in the actual Postman GUI (see question below) before doing any pull request but don't know how to do that!

Also had a other questions:

  • Is there a more specific process than what in the CONTRIBUTING guide to pull requests?
  • Is there any way to load a "development" code generator into to the Postman GUI so it appear in the list? I kinda want to use the GUI to run some additional test and generate the test cases ;).
  • What is the general scheme for "unconvertible" things in a Request? - as there are some things in a Postman Request that cannot be done using RouterOS /tool/fetch. Both curl and http codegen do not return any errors in the callback, so was not clear how to provide errors/issues in conversion. Right now, I just add code comment to the snippet generated with "potential problems" rather than figuring out how to provide a "hard" error in callback (so it's null).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions