Skip to content

Commit 0fb5e80

Browse files
committed
updated RequestBodySerualizer.cs
1 parent 0807c29 commit 0fb5e80

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/FastPix/UnityStubs.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public sealed class SerializeFieldAttribute : Attribute { }
1111

1212
public class AsyncOperation
1313
{
14-
public Action<AsyncOperation> completed;
14+
public Action<AsyncOperation>? completed;
1515
internal void Complete() => completed?.Invoke(this);
1616
}
1717
}
@@ -83,8 +83,8 @@ public class UnityWebRequest : IDisposable
8383
public Uri uri { get; private set; }
8484
public string url { get; set; }
8585
public long responseCode { get; set; }
86-
public DownloadHandler downloadHandler { get; set; }
87-
public UploadHandler uploadHandler { get; set; }
86+
public DownloadHandler? downloadHandler { get; set; }
87+
public UploadHandler? uploadHandler { get; set; }
8888
public Result result { get; set; } = Result.Success;
8989

9090
public UnityWebRequest(string url, string method)
@@ -93,9 +93,9 @@ public UnityWebRequest(string url, string method)
9393
this.uri = new Uri(url);
9494
}
9595

96-
public void SetRequestHeader(string key, string value) { }
96+
public void SetRequestHeader(string? key, string? value) { }
9797
public Task SendWebRequest() => Task.CompletedTask;
98-
public string GetResponseHeader(string name) => null;
98+
public string? GetResponseHeader(string name) => null;
9999
public void Dispose() { }
100100

101101
public enum Result { Success, ConnectionError, DataProcessingError, ProtocolError }
@@ -111,7 +111,7 @@ public abstract class DownloadHandler
111111
{
112112
public virtual byte[] data => Array.Empty<byte>();
113113
public virtual string text => System.Text.Encoding.UTF8.GetString(data);
114-
public virtual string GetResponseHeader(string name) => null;
114+
public virtual string? GetResponseHeader(string name) => null;
115115
}
116116

117117
public class UploadHandler { }

src/FastPix/Utils/RequestBodySerializer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ private static SerializedRequestBody SerializeMultipart(object request, string m
322322

323323
var boundary = UnityWebRequest.GenerateBoundary();
324324

325-
var parts = mediaType.Split(";");
325+
var parts = mediaType.Split(';');
326326

327327
return new SerializedRequestBody(
328328
$"{parts[0]}; boundary={Encoding.ASCII.GetString(boundary)}",

0 commit comments

Comments
 (0)