JSON Porn

फ्रीमियम
द्वारा Steppschuh | अपडेट किया गया 25 дней назад | Entertainment
लोकप्रियता

8.6 / 10

लेटेंसी

435ms

सेवा का स्तर

100%

Health Check

N/A

सभी चर्चाओं पर वापस जाएं

Reading unirest

Rapid account: Chris Winchester
ChrisWinchester
9 лет назад

For .net, can I simply create a request and response and read the stream into a string? What do I do with the .headers?

Rapid account: Steppschuh
Steppschuh Commented 8 лет назад

I’d try something like:

string url = "https://steppschuh-json-porn-v1.p.mashape.com/search/?q=Housewife";
HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(url);
webRequest.Headers.Add("X-Mashape-Key", apiKey);

Please try to check StackOverflow for language specific questions that aren’t related to the API. That will save your and my time.

Rapid account: Wanjohim
wanjohim Commented 8 лет назад

I want to create a single http request in C# that contains the search parameters and the my subscription key. how is that possible?

Rapid account: Steppschuh
Steppschuh Commented 9 лет назад

No, that completely depends on how you send your request. You usually have an extra field for headers. Like described here: http://unirest.io/java.html at “Creating Request”

Rapid account: Chris Winchester
ChrisWinchester Commented 9 лет назад

How to I send the header with the key using Http request or url request? It goes after the address, yes?

Rapid account: Steppschuh
Steppschuh Commented 9 лет назад

I personally never worked with unirest in .NET, but there are plenty of guides out there. See:

https://github.com/Mashape/unirest-net
http://blog.mashape.com/unirest-for-net-c-vb-net-etc-desktop-and-windows/

चर्चा में शामिल हों - नीचे टिप्पणी जोड़ें:

नई टिप्पणियाँ पोस्ट करने के लिए लॉग इन / साइनअप करें