Skip to content

giteaApi

请求

import requests
token='978f80517184fc426c7f437f9069aa871db796e0'
url = "http://git.buystock.top:3000/api/v1/admin/users"
headers = {
    "accept": "application/json",
    "Authorization": f"token {token}"
}
data = {
    "created_at": "2019-08-24T14:15:22Z",
    "email": "user@example.com",
    "full_name": "string",
    "login_name": "string",
    "must_change_password": True,
    "password": "string",
    "restricted": True,
    "send_notify": True,
    "source_id": 0,
    "username": "string",
    "visibility": "string"
}

response = requests.post(url, headers=headers, json=data)

response.content