Bad Request when writing AppProperties for the file

25 views
Skip to first unread message

diskw...@gmail.com

unread,
Feb 8, 2019, 2:03:10 AM2/8/19
to Google APIs Explorer Users Forum
There is a problem writing AppProperties for the file. The request is executed, then an error is returned 400.

Request is sent via dotnet api:

public Resource ResourcePatch(string FileID, IDictionary<string, string> properties)
        {

                GoogleAPI.File file = new GoogleAPI.File() { AppProperties = properties };

                var updateRequest = _driveService.Files.Update(file, FileId);
                updateRequest.Fields = "id, appProperties";

                file = updateRequest.Execute();

...

This is what is sent and what I get:

Request:

User-Agent: Sberdisk google-api-dotnet-client/1.38.0.0 (gzip)
Authorization: Bearer ...
Content-Type: application/json; charset=utf-8
Content-Length: 49
Accept-Encoding: gzip, deflate

{"appProperties":{"SHARED_PROPERTY_NAME":"true"}}

Response, sometimes:

HTTP/1.0 200 This buggy server did not return headers

<html><title>Error 400 (Bad Request)!!1</title></html>

Sometimes:

HTTP/1.1 200 OK
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: Mon, 01 Jan 1990 00:00:00 GMT
Date: Thu, 07 Feb 2019 12:39:13 GMT
Vary: Origin
Vary: X-Origin
Content-Type: application/json; charset=UTF-8
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: GSE
Alt-Svc: quic=":443"; ma=2592000; v="44,43,39"
Content-Length: 183

{
 "id": "1nWtqhBYKSl0YhtLMypEx5rmAuo43-3Ts",
 "appProperties": {
  "SHARED_PROPERTY_NAME": "true"
 }
}

Sometimes the request is executed, sometimes an Bad Request. I do't see system logic in this. What can be the reason?
Reply all
Reply to author
Forward
0 new messages