Skip to content

Correctly generate sync server API url #41

@cweiske

Description

@cweiske

tomboy.osx uses the given sync server URL, adds api/1.0 and sends a request to that location:

tomboy-library/Tomboy-library/Tomboy/Sync/WebSync/OAuth/OAuthConnection.cs
91:         apiRoot = rest_client.Get<ApiResponse> (rootUrl+ "api/1.0/");

All other clients at least add a slash between the root URL and api, so that URLs like
http://example.org/sync get an API URL of http://example.org/sync/api/1.0/. Some other clients do not work when giving the root url without slash.

Currently I would have to give users two instructions in grauphel: One URL that works with tomboy.osx, and one that works with all other clients.

Please make the API URL generation a bit smarter by adding a / after rootUrl if it does not end with one.

So that the user can input an URL with or without a slash, and tomboy.osx automatically does the right thing:

  • http://example.org/sync -> http://example.org/sync/api/1.0/
  • http://example.org/sync/ -> http://example.org/sync/api/1.0/

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