Skip to content

docs: update resty example#160

Merged
maxatome merged 3 commits into
jarcoal:v1from
tymcgee:v1
Dec 27, 2024
Merged

docs: update resty example#160
maxatome merged 3 commits into
jarcoal:v1from
tymcgee:v1

Conversation

@tymcgee

@tymcgee tymcgee commented Dec 25, 2024

Copy link
Copy Markdown
Contributor

Fixes #150.

  • Switches the example to use resty/v2, which no longer supports resty.DefaultClient
  • Uses a global client instead, which seems to be required in a case like this because resty.New() creates a new transport every time it is called
  • Uses a json responder instead of a text responder to set the content-type header correctly, as referenced in Update resty usage example + Add JsonString responder #150 (comment)

Fixes issue #150. Switches the example to use resty/v2, which no longer
supports resty.DefaultClient. It additionally uses a json responder
instead of a text responder to set the content-type header correctly, as
referenced in #150 (comment)

@maxatome maxatome left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, could you fix these small typos, please?

Comment thread README.md Outdated
Comment thread README.md Outdated
tymcgee and others added 2 commits December 25, 2024 18:57
Co-authored-by: Maxime Soulé <btik-git@scoubidou.com>
Co-authored-by: Maxime Soulé <btik-git@scoubidou.com>
@tymcgee tymcgee requested a review from maxatome December 26, 2024 23:26
@maxatome maxatome merged commit ee13561 into jarcoal:v1 Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update resty usage example + Add JsonString responder

2 participants