Request Method: DELETE how to convert c#

paydot

Client
Регистрация
21.11.2012
Сообщения
56
Благодарностей
1
Баллы
8
Could someone please help me to change it,THX!

:authority: www.xxx.com
:method: DELETE
:path: /api/v1/
:scheme: https
accept: application/json
accept-encoding: gzip, deflate, br
accept-language: zh-CN,zh;q=0.9,zh-TW;q=0.8
content-length: 86
content-type: application/json
cookie: u=s%3A312ea344-dfdaddsfd
origin: https://www.xxx.com
referer: https://www.xxx.com/app/
user-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
x-csrf-token: TGhL5zUi-46p_owI7cxxxxQ7VB_W7OQ
x-requested-with: XMLHttpRequest
 

ZComand

Client
Регистрация
02.02.2016
Сообщения
57
Благодарностей
63
Баллы
18
C#:
string url = "www.xxx.com/api/v1/";
string proxy = "";
string cookies = "u=s%3A312ea344-dfdaddsfd";
string userAgent = "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36";
string[] headers = { "origin: https://www.xxx.com", "referer: https://www.xxx.com/app/", "x-csrf-token: TGhL5zUi-46p_owI7cxxxxQ7VB_W7OQ", "x-requested-with: XMLHttpRequest" };
ZennoPoster.HTTP.Request(ZennoLab.InterfacesLibrary.Enums.Http.HttpMethod.DELETE, url, "", "application/json", proxy, "UTF-8",ZennoLab.InterfacesLibrary.Enums.Http.ResponceType.BodyOnly, 30000, cookies, userAgent,true, 5, headers);
 
  • Спасибо
Реакции: paydot

paydot

Client
Регистрация
21.11.2012
Сообщения
56
Благодарностей
1
Баллы
8
C#:
string url = "www.xxx.com/api/v1/";
string proxy = "";
string cookies = "u=s%3A312ea344-dfdaddsfd";
string userAgent = "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36";
string[] headers = { "origin: https://www.xxx.com", "referer: https://www.xxx.com/app/", "x-csrf-token: TGhL5zUi-46p_owI7cxxxxQ7VB_W7OQ", "x-requested-with: XMLHttpRequest" };
ZennoPoster.HTTP.Request(ZennoLab.InterfacesLibrary.Enums.Http.HttpMethod.DELETE, url, "", "application/json", proxy, "UTF-8",ZennoLab.InterfacesLibrary.Enums.Http.ResponceType.BodyOnly, 30000, cookies, userAgent,true, 5, headers);
THX!!

and how to add the request data

{"order":"e5a36415-8915-ea7c-d45d-0be82a50f9a2","text":"buy"}
 

ZComand

Client
Регистрация
02.02.2016
Сообщения
57
Благодарностей
63
Баллы
18
and how to add the request data
C#:
string url = "www.xxx.com/api/v1/";
string data = "{\"order\":\"e5a36415-8915-ea7c-d45d-0be82a50f9a2\",\"text\":\"buy\"}";
string proxy = "";
string cookies = "u=s%3A312ea344-dfdaddsfd";
string userAgent = "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36";
string[] headers = { "origin: https://www.xxx.com", "referer: https://www.xxx.com/app/", "x-csrf-token: TGhL5zUi-46p_owI7cxxxxQ7VB_W7OQ", "x-requested-with: XMLHttpRequest" };
ZennoPoster.HTTP.Request(ZennoLab.InterfacesLibrary.Enums.Http.HttpMethod.DELETE, url, data, "application/json", proxy, "UTF-8",
                ZennoLab.InterfacesLibrary.Enums.Http.ResponceType.BodyOnly, 30000, cookies, userAgent,true, 5, headers);
You're welcome ;-)
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)