Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetContentByteArray()

static byte[] System.Net.Http.FormUrlEncodedContent.GetContentByteArray ( IEnumerable< KeyValuePair< string, string > > nameValueCollection)
inlinestaticprivate

Definition at line 18 of file FormUrlEncodedContent.cs.

19 {
20 if (nameValueCollection == null)
21 {
22 throw new ArgumentNullException("nameValueCollection");
23 }
26 {
27 if (stringBuilder.Length > 0)
28 {
29 stringBuilder.Append('&');
30 }
31 stringBuilder.Append(Encode(item.Key));
32 stringBuilder.Append('=');
33 stringBuilder.Append(Encode(item.Value));
34 }
35 return HttpRuleParser.DefaultHttpEncoding.GetBytes(stringBuilder.ToString());
36 }

References System.Net.Http.HttpRuleParser.DefaultHttpEncoding, System.Net.Http.FormUrlEncodedContent.Encode(), and System.item.