Usuń
Lista wszystkich publicznie dostępnych metod interakcji z API.
DELETE
Usuwanie pakietu -/package/delete/{id}
Metoda zapytania
DELETEhttp://apilocal.stableproxy.com/v2/package/delete/{id}
Parametry zapytania
Identyfikator | Regulamin | Przykład |
---|---|---|
name | requiredstring | "hackett.theodore" |
id | 1required | 49 |
Przykłady kodu
JavaScript
1async function deletePackageDelete() {
2 const baseUrl = 'http://apilocal.stableproxy.com/v2';
3 const req = await fetch(baseUrl + '/package/delete/{id}'
4 .replace("{id}", 49), {
5 method: 'DELETE',
6 headers: {
7 'Authorization': 'API-Token [YOUR TOKEN]',
8 'Content-Type': 'application/json'
9 },
10 body: JSON.stringify({
11 "name": "hackett.theodore"
12 }),
13 }
14 );
15
16 const res = await req.json();
17}