Skip to content

Add a way to get content without URL encoding query params #66

@0xDagal

Description

@0xDagal

Is your feature request related to a problem? Please describe.
I try to request a page by its title, but it has space in it so this title spaces are translated to "+" by Confluence which is URL encoded to "%2B" by the SDK, but the API does not understand it.

https://my-confluence-instance.lan/rest/api/content?title=My+Page => ok
https://my-confluence-instance.lan/rest/api/content?title=My%2BPage => nok

Describe the solution you'd like
Add a parameter in GetContent to tell it to URL encode the params or just "stringify" it. I will send a PR for that.

Describe alternatives you've considered
To make it work for my needs, I chained directly the params with a simple fmt.Sprintf and put it in the url.URL.RawQuery

Additional context
From my Confluence instance manifest:

<version>8.5.14</version>
<buildNumber>19243</buildNumber>
<applinksVersion>9.1.8</applinksVersion>

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