Feature #7684

Net::HTTPHeader#set_form_data should accept a String

Added by Hal Brodigan over 1 year ago. Updated about 1 year ago.

[ruby-core:51375]
Status:Rejected
Priority:Normal
Assignee:Yui NARUSE
Category:lib
Target version:next minor

Description

I noticed that Net::HTTPHeader#setformdata does not accept already encoded form-data, but instead passes an Array/Hash down to URI.encodewwwform.

set_form_data_string.diff Magnifier (579 Bytes) Lee Jarvis, 01/11/2013 10:03 PM

History

#1 Updated by Lee Jarvis over 1 year ago

You could just set the content body yourself. But I see no reason why set_form_data shouldn't accept a string either

#2 Updated by Koichi Sasada about 1 year ago

  • Assignee set to Yui NARUSE
  • Target version set to next minor

Is it a feature request?

#3 Updated by Eric Hodel about 1 year ago

  • Tracker changed from Bug to Feature

If it didn't work this way before I think it is a feature request.

#4 Updated by Yui NARUSE about 1 year ago

  • Status changed from Open to Rejected

Such backdoor breaks the convention that this method returns a valid application/x-www-form-urlencoded string.

You should set it directly to body.

Also available in: Atom PDF