Skip to content
This repository has been archived by the owner on Oct 30, 2023. It is now read-only.

URI.encode deprecated on ruby 3.0.0 #36

Open
MittchoBaroco opened this issue Mar 2, 2021 · 1 comment
Open

URI.encode deprecated on ruby 3.0.0 #36

MittchoBaroco opened this issue Mar 2, 2021 · 1 comment

Comments

@MittchoBaroco
Copy link

Reproduce

content_type = "application/json"
accept       = "application/json"
body         = JCAPIv1::Systemuserputpost.new
x_org_id     = ENV['JC_ORG_ID']

opts         = {
    body: body,
    x_org_id: ""
}

JCAPIv1::SystemusersApi.new.systemusers_post(content_type, accept, opts)

Result

 NoMethodError:
       undefined method `encode' for URI:Module
     # ./app/services/jumpcloud/create_system_user.rb:13:in `call'

Resolve

https://docs.knapsackpro.com/2020/uri-escape-is-obsolete-percent-encoding-your-query-string

@MittchoBaroco MittchoBaroco changed the title URI.encode deprecated with ruby 3.0.0 URI.encode deprecated on ruby 3.0.0 Mar 2, 2021
@davidwparker
Copy link

davidwparker commented Nov 16, 2021

Also in version 2:

opts = {
    limit: 50, # The number of records to return at once.
    skip: 0
  }
JCAPIv2::SystemInsightsApi.new.systeminsights_list_system_info("application/json", "application/json", opts)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants