-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NULL values for parameters do not work #1420
Comments
Could you elaborate what "it doesn't work" mean? |
I am calling a rest API that updates a customer record. Customer had a POBox address before and now its changed to a regular address. So I want to set he POBox field to blank. Please see Actual Behaviour section in the above issue description. |
I assume that NULL refers to a missing value. What kind of API are you calling? When you do a request using Postman, how does it look like? |
Sorry but I see RestSharp code but where is the Postman request? |
There's no need to repeat the same information. I am asking what the request look like in HTTP. You can use, for example, Fiddler, to inspect the request. |
Is this what you wanted?
|
Are you clear about the problem when you consider all the information provided in this ticket? Please feel free to let me know if you need anything else. Looking forward to see this getting resolved fast. Thanks. |
Should be working in 106.11. Please reopen if the issue still occurs. |
Expected Behavior
I want to set a field in the application to NULL and I can use Postman to do it and it works. However, using RestSharp it doesn't work. Expectation is to set the value to null or empty.
Example:
currently in target application;
POBox = PO BOX 1234
I want to make it;
POBox = blank text box
Actual Behavior
The value of the target does not change. Seems like if a parameter is set to a null value it is ignored.
Example:
POBox = PO BOX 1234 stays unchanged after the call.
Steps to Reproduce the Problem
RestClient client = GetClient();
RestRequest request = new RestRequest("url", Method.PUT);
request.AddParameter("POBox", null);
IRestResponse<Contact> response = client.Execute<Contact>(request);
Specifications
Please feel free to let me know if there are any further information required that could help.
The text was updated successfully, but these errors were encountered: