Project

General

Profile

Actions

Misc #16916

closed

[Documentation] Method: Net::HTTPHeader#set_form

Added by noraj (Alexandre ZANNI) almost 4 years ago. Updated almost 4 years ago.

Status:
Closed
Assignee:
-
[ruby-core:98534]

Description

Since this revision / commit

the Net::HTTP documentation talks about multipart supports (as I understood introduced in ruby 1.9.3).

When we go take a look at Net::HTTPHeader#set_form, we read about a formopt argument and the following documentation

formopt is an optional hash to specify the detail.

and the description of the structure of the params argument. The params argument is an array where each items contains 3 elements, the third one is opt described as

an optional hash to specify additional information

But there is not documentation about what formopt and opt are expecting nor a reference to something else that can explain it.

I think that lib/net/http/header.rb documentation for Net::HTTPHeader#set_form should be improved to include documentation about formopt and opt.

https://github.com/ruby/ruby/blob/master/lib/net/http/header.rb#L453
https://bugs.ruby-lang.org/projects/ruby-master/repository/git/revisions/master/entry/lib/net/http/header.rb#L453

For example I guess that opt hash for an item of type file could maybe have an option to specify the content-type (eg. application/zip) or the name of the file, etc.

Actions #1

Updated by jeremyevans (Jeremy Evans) almost 4 years ago

  • Status changed from Open to Closed

Applied in changeset git|fa380208fe4ef36cd6a8535d3ac43e61c7935f1c.


Improve documentation for Net::HTTPHeader#set_form [ci skip]

Fixes [Misc #16916]

Actions

Also available in: Atom PDF

Like0
Like0