Skip to content

Provide URL Prefix as JS function argument #2

Open
@quantifiedtran

Description

@quantifiedtran

I'm writing a server which isn't necessarily accessed from a browser front end or on the same domain as the server itself. Because of this, it would be necessary to provide the address of the server as an additional argument to the generated javascript functions as so:

var getX = function( onSuccess
                   , onError
                   , serverAddress) // The additional server address argument
{
  // ...
  xhr.open('GET'
          , serverAddress + '/x' // Preappend the server address to the route
          , true);
  // ...
}

But I've not found an option to do so that's not generating and modifying the API by hand constantly.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions