https://github.com/pjc0247/stronghttp
Make Interface All the REST Requests! (강력한 REST 콜)
https://github.com/pjc0247/stronghttp
csharp emit http reflection
Last synced: about 2 months ago
JSON representation
Make Interface All the REST Requests! (강력한 REST 콜)
- Host: GitHub
- URL: https://github.com/pjc0247/stronghttp
- Owner: pjc0247
- Created: 2015-10-28T09:27:31.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-10-19T03:40:50.000Z (over 6 years ago)
- Last Synced: 2025-03-02T20:52:10.223Z (about 2 months ago)
- Topics: csharp, emit, http, reflection
- Language: C#
- Homepage:
- Size: 214 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
StrongHTTP
====

Make Interface All the REST Requests!
[](https://travis-ci.org/pjc0247/StrongHTTP)__[documentation](doc)__
Overview
----
If you want to call REST method which has a specification like below:
```
GET /mymath/sum{
"x" : NUMBER,
"y" : NUMBER
}
```
```
{
"result" : NUMBER
}
```just make a interface and describe your API.
```cs
[Service("/mymath")]
interface MyRESTClient {
[Resource("/sum")]
[ResponsePath("result")]
int Sum(int x, int y);
// also supports `Async` functions.
Task SumAsync(int x, int y);
}
```then __StrongHTTP__ will make a proper implementation for you.
```cs
var client = RemotePoint.Create("https://api.example.com");var result = await client.SumAsync(10, 20); // 30
```Usage with NaverTranslate API
----
https://github.com/pjc0247/NaverTranslatorFeatures
----
* supports `async`
* 없음외 많들었나?
----
* 왭 API의 파라미터와 리턴 타입을 정의하는것 만으로도 동작하게 하기 위해서
* 강타입 언어인 C#의 특성을 잘 이용하기 위해서 (VS 인텔리센스, 타입체크 등)