Skip to content

Check if body is null#26

Merged
mavezeau merged 1 commit intomavezeau:masterfrom
tidharmor:master
Jan 8, 2020
Merged

Check if body is null#26
mavezeau merged 1 commit intomavezeau:masterfrom
tidharmor:master

Conversation

@tidharmor
Copy link
Copy Markdown

using client.ServerInformation.TriggerServerInstanceBackup calls Post with null body which causes an exception.

using client.ServerInformation.TriggerServerInstanceBackup calls Post with null body which causes an exception.
@oubenal
Copy link
Copy Markdown

oubenal commented Nov 24, 2019

instead u could replace null with an empty string in line below (called by TriggerServerInstanceBackup )

var response = httpClient.Post(url, null, HttpContentTypes.TextPlain);

@tidharmor
Copy link
Copy Markdown
Author

instead u could replace null with an empty string in line below (called by TriggerServerInstanceBackup )

var response = httpClient.Post(url, null, HttpContentTypes.TextPlain);

But then you risk having another call to Post with null.
If you fix the Post/Put extension methods you eliminate this bug in other places if it exists.

@mavezeau mavezeau merged commit 6484452 into mavezeau:master Jan 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants