Http Get with Headers

EtaLasquera

Client
Регистрация
02.01.2017
Сообщения
526
Благодарностей
112
Баллы
43
I'm trying to send a HTTP Get with params from C# code:
Код:
return ZennoPoster.HttpGet("https://cant_share_api_here",
     instance.GetProxy(),
     "UTF-8",
     ZennoLab.InterfacesLibrary.Enums.Http.ResponceType.HeaderAndBody,
     60,
     "",
     "",
     false,
     0,
     AdditionalHeaders: new []{"Authorization:Bearer aju348d12e1324", "Accept:application/json"}
     );
But this always return nothing.
Can anyone help me to send a custom header param with http get?
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 812
Благодарностей
1 187
Баллы
113
Hi. Headers and parameters are not that same.

Meaning You should read API documentation to understand more. Just for your information, I have got to work with one very complex API. It took me two days to understand how it works. LOL
 

EtaLasquera

Client
Регистрация
02.01.2017
Сообщения
526
Благодарностей
112
Баллы
43
Sure... I need to add a raw data into a http get but I don't found any documentation about "how to add data" into a HTTP GET.
In C# I can pass aditional headers....
Parameters I can pass by ZennoPoster.HttpGet("www.zennolab.com?myparams=xanis");

But... raw data...how to add data into a GET request?
There is no documentation about that.
Since frameworks like laravel and angular accepts data into a get request, we need a sample documentation about how to add data into http get.
 

EtaLasquera

Client
Регистрация
02.01.2017
Сообщения
526
Благодарностей
112
Баллы
43
Посмотреть вложение 25090 Посмотреть вложение 25087 Посмотреть вложение 25089 I have a "big" key to add to headers:
Код:
Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjIwNmIzZTYwZGJjNzZlNWM2NTdhODA2ZDRiYjU2YjQ5MzNiZGQyYjI2YzliODk4NzY5YjdiNDQxZmQ2ZWE4MTA3OTA2OWI5ODliNDYwOTM3In0.eyJhdWQiOiIyIiwianRpIjoiMjA2YjNlNjBkYmM3NmU1YzY1N2E4MDZkNGJiNTZiNDkzM2JkZDJiMjZjOWI4OTg3NjliN2I0NDFmZDZlYTgxMDc5MDY5Yjk4OWI0NjA5MzciLCJpYXQiOjE1MTI0MTMwNDMsIm5iZiI6MTUxMjQxMzA0MywiZXhwIjoxNTQzOTQ5MDQyLCJzdWIiOiI2Iiwic2NvcGVzIjpbXX0.TC87t5_a828yZhc2ymk6kEy2Bm4HCFN39NYI48PLR00HQnrj9b6Zupkxn37xIYoTvGa-xBYivlXdX0wOvcSRGvsKEsVJklR7xq-WTJOnNfJSnWz3tlnPGTsq_VqVzEhBcqzpPMmmZtScx4qlFajrsGhAa-9cISwkn6Xd3IwSPmWMK3Q3ARaPuLELnPeUJl3Xecx0QO4rA3oRqtZG5Q6qdY7_6qisz4d1zx3AdWC__LpoRYo04nOmR7DZjof9Sdl0mIAiBCgCnlZokY-QOkJinFjO_w-ovWWWLWkCl0Cm99e58W560HsEGaSCCp34JMlyeX3JTPR81PXhIdORRUVPwMMlbNUTSZznqqhxO4XU69ZQXyda0paKOUO1eeLbeVZSJ-1lrPlBe1F9fAKSz8yenP0_hR-cnlFf7Jed500yxbMhB5ykaJSuh1kC0ewFqVH4NLHvvdsmtkP0QODQkHipmFB-QORlkdIgTm-4fqu9lCyyVdx-o_X8OeaHVfjrLxW1KaWrkm9uErNbs0in2zPQ1wy-KtmiWYV64B0gHMzwXKsSUwrRK35UbYDewBQncUH_RmaOJ1HaSkH-un8cDF7et_tdrn6jchBlB-8vA4-a_1RxH4OiF4n7B946sd1gLytPFWDtHtmeWZhMVcZMig2RD_fZyMpe_F5n1hnqaEp2evc
And... when I put this line into headers, the "traffic" says "nothing".



httpGet.png




I have added Fiddler and Postman responses:

postman.png


fidler2.png
 

EtaLasquera

Client
Регистрация
02.01.2017
Сообщения
526
Благодарностей
112
Баллы
43
Done by myself... LOL
Код:
return ZennoPoster.HttpGet("https://cant_share_api_here",
     instance.GetProxy(),
     "UTF-8",
     ZennoLab.InterfacesLibrary.Enums.Http.ResponceType.HeaderAndBody,
     999999999, //LOL
     "",
     "",
     false,
     0,
     AdditionalHeaders: new []{"Authorization:Bearer aju348d12e1324", "Accept:application/json"}
     );
 
  • Спасибо
Реакции: morpheus93 и orka13

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