If you were going to give the "charset=utf-8" part above a name, what would it be? I'm not sure it has a technical term and is just considered part of the overall header but I need to think of a logical name for it so I can make a method:
If you were going to give the "charset=utf-8" part above a name, what would it be? I'm not sure it has a technical term and is just considered part of the overall header but I need to think of a logical name for it so I can make a method:
None of them feel quite right and some feel too close to the meaning of setHeader().
EDIT | Maybe setHeaderNameValuePair() ? Ack.
setCharSet() or setCharEncoding()
I'm unclear as to what you are trying to accomplish. You already have a low-level method called setHeader() but you want a specialized method for setting (what I assume are sub-properties/headers of Content-Type?) name - value pairs which are strictly bound to the header Content-Type???
According to the RFCs, Content-Type is a header field, text is a media type, plain is a subtype, and you have 1 parameter- an attribute called charset with a value of utf-8.