PUT request for modify file

Hi,

I am using the below CURL command to update a file in gitea, but it looks stalled. The same behaviour is in javascript with XMLHttpRequest and with fetch(), I got no answer, nothing:

curl -v -X PUT “path-to-host-and-file” -H “accept: application/json” -H “Content-Type: application/json” -H “Authorization: token …” -d ‘{“content”:“content in base64 format”,“message”:“Updated file uuid-74f5ca75-7022-4c7c-b5ca-7570225c7c55”,“author”:{“email”:“email”,“name”:“name”}}’ -i

  • Trying host…
  • TCP_NODELAY set
  • Connected to host (host) port 3000 (#0)

PUT /api/v1/repos/path-to-file HTTP/1.1
Host: host:3000
User-Agent: curl/7.58.0
accept: application/json
Content-Type: application/json
Authorization: token …
Content-Length: 6340
Expect: 100-continue

< HTTP/1.1 100 Continue
HTTP/1.1 100 Continue

  • We are completely uploaded and fine

Thanks,
Claudius

Shortly, I am not getting response 200 and the response as in swagger:
{
“commit”: {
“author”: {
“date”: “string”,
“email”: “…”,
“name”: “string”
},
“committer”: {
“date”: “string”,
“email”: “…”,
“name”: “string”
},
“html_url”: “string”,
“message”: “string”,
“parents”: [
{
“sha”: “string”,
“url”: “string”
}
],
“sha”: “string”,
“tree”: {
“sha”: “string”,
“url”: “string”
},
“url”: “string”
},
“content”: {
“_links”: {
“git”: “string”,
“html”: “string”,
“self”: “string”
},
“content”: “string”,
“download_url”: “string”,
“encoding”: “string”,
“git_url”: “string”,
“html_url”: “string”,
“name”: “string”,
“path”: “string”,
“sha”: “string”,
“size”: 0,
“submodule_git_url”: “string”,
“target”: “string”,
“type”: “string”,
“url”: “string”
},
“verification”: {
“payload”: “string”,
“reason”: “string”,
“signature”: “string”,
“signer”: {
“email”: “user@example.com”,
“name”: “string”,
“username”: “string”
},
“verified”: true
}
}

Any ideas?

Thanks,
Claudius