-
-
Notifications
You must be signed in to change notification settings - Fork 744
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
PATCH Bad Request (400) Using Requests #1274
Comments
If you set debug mode on, you are likely to get back an error explanation in the body of the response. See if that helps. |
I've found HTTP 400 error when patching a sub-document, If the key being patched is nullable and still does not exist in the document being patched. Eve 0.9.1 Note: Using eve 0.8.1 in same scenario, the error does not occur. The error stack is:
Minimum schema for example is like this:
PATCH body is:
If |
@gwainer can you try with eve from this branch https://github.com/sunbit/eve/tree/fix_put_normalize_%231280 I have a pending PR #1280 to approve, that fixed just that lines of code that are giving you the problem. |
@sunbit I've just tested and I'm happy to inform that it solves my scenario too. Thanks a lot for your work. |
Environment
iam using requests.patch
i've added If-Match headers on headers like this
headers = {'Content-Type': 'application/json', 'If-Match' : '741372f7206cb126aa465c720ba90d2312bfb308'}
data = {'field_name' : value}
response = requests.patch(api_url, data= data, auth=('uname', 'pswd'), headers=headers)
but i got 400 bad request
could somebody help me ?
or my codes are wrong ?
Thanks !
The text was updated successfully, but these errors were encountered: