JSON Porn

免费增值
通过 Steppschuh | 已更新 vor 25 Tagen | Entertainment
人气

8.6 / 10

延迟

435ms

服务等级

100%

Health Check

N/A

返回所有讨论

Reading unirest

Rapid account: Chris Winchester
ChrisWinchester
vor 9 Jahren

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 vor 8 Jahren

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 vor 8 Jahren

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 vor 9 Jahren

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 vor 9 Jahren

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 vor 9 Jahren

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/

加入讨论 - 在下面添加评论:

登录/注册以发布新的评论