Feature #7684

Net::HTTPHeader#set_form_data should accept a String

Added by Hal Brodigan almost 3 years ago. Updated almost 3 years ago.

Assignee:Yui NARUSE


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

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


#1 Updated by Lee Jarvis almost 3 years 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 almost 3 years ago

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

Is it a feature request?

#3 Updated by Eric Hodel almost 3 years 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 almost 3 years 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