Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update resty example #160

Merged
merged 3 commits into from
Dec 27, 2024
Merged

docs: update resty example #160

merged 3 commits into from
Dec 27, 2024

Conversation

tymcgee
Copy link
Contributor

@tymcgee tymcgee commented Dec 25, 2024

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 jarcoal#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 jarcoal#150 (comment)
Copy link
Collaborator

@maxatome maxatome left a comment

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?

tymcgee and others added 2 commits December 25, 2024 18:57
@tymcgee tymcgee requested a review from maxatome December 26, 2024 23:26
@maxatome maxatome merged commit ee13561 into jarcoal:v1 Dec 27, 2024
13 checks passed
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