Skip to content

Posting an object with Ruby API client results in NoMethodError #2473

Closed

Description

Same repro as #2471

This code:

# POST /posts
new_post = Client::Models::Post.new()
new_post.user_id = 42
new_post.title = "Testing Kiota-generated API client"
new_post.body = "Hello world!"

created_post = client.posts.post(new_post).resume
puts "Created new post with ID: #{created_post.id}"

Results in an error:

in to_post_request_information': undefined method request_adapter' for #<Client::Posts::PostsRequestBuilder...
(NoMethodError)

 request_info.set_content_from_parsable(self.request_adapter, "application/json", body)\r

Changing to this resolves the error:

request_info.set_content_from_parsable(@request_adapter, "application/json", body)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions