All Projects → xiaojiaoyu100 → cast

xiaojiaoyu100 / cast

Licence: MIT License
Go http request library

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to cast

angular6-httpclient-example
Angular 6 HttpClient: Consume RESTful API Example
Stars: ✭ 38 (+90%)
Mutual labels:  httpclient
Curio
A Blazing Fast HTTP Client
Stars: ✭ 35 (+75%)
Mutual labels:  httpclient
RestSharpFramework
Framework for testing RESTful Services with RestSharp and C# HTTP Client
Stars: ✭ 18 (-10%)
Mutual labels:  httpclient
Spooky
An HttpClient based Json RPC 2.0/XML-RPC client for .Net.
Stars: ✭ 16 (-20%)
Mutual labels:  httpclient
windigo-android
Windigo is easy to use type-safe rest/http client for android
Stars: ✭ 23 (+15%)
Mutual labels:  httpclient
SocksSharp
SocksSharp provides support for Socks4/4a/5 proxy servers to HttpClient
Stars: ✭ 75 (+275%)
Mutual labels:  httpclient
VSoft.HttpClient
WinHTTP Client for Delphi
Stars: ✭ 18 (-10%)
Mutual labels:  httpclient
crawler
A simple and flexible web crawler framework for java.
Stars: ✭ 20 (+0%)
Mutual labels:  httpclient
sapper-httpclient
An isomorphic http client for Sapper
Stars: ✭ 48 (+140%)
Mutual labels:  httpclient
study-http
HTTP Java 로 구현하기
Stars: ✭ 15 (-25%)
Mutual labels:  httpclient
fastcrawler
一个快速,简单,基于多线程的网络爬虫框架
Stars: ✭ 12 (-40%)
Mutual labels:  httpclient
AspNetCore.Client
On Build client generator for asp.net core projects
Stars: ✭ 14 (-30%)
Mutual labels:  httpclient
http bench
golang HTTP stress test tool, support single and distributed
Stars: ✭ 142 (+610%)
Mutual labels:  httpclient
java-sdk
一些常用的java sdk和工具类(日期工具类,分布式锁,redis缓存,二叉树,反射工具类,线程池,对称/非对称/分段加解密,json序列化,http工具,雪花算法,字符串相似度,集合操作工具,xml解析,重试Retry工具类,Jvm监控等)
Stars: ✭ 26 (+30%)
Mutual labels:  httpclient
mtxclient
Client API library for Matrix, built on top of Boost.Asio
Stars: ✭ 21 (+5%)
Mutual labels:  httpclient
go-web-demo
基于gin的go web框架。包含log、mysql、redis、httpClient、grpcClient、hystrix 等组件,swagger、pprof集成。
Stars: ✭ 72 (+260%)
Mutual labels:  httpclient
FastHttpClient
封装OkHttp3,对外提供了POST请求、GET请求、上传文件、下载文件、https请求、cookie管理等功能
Stars: ✭ 60 (+200%)
Mutual labels:  httpclient
RepositoryHelpers
📦 Extensions for HttpClient and Custom Repository based on dapper
Stars: ✭ 22 (+10%)
Mutual labels:  httpclient
EfficientHttpClient
Source code illustrating how to make efficient HttpClient api calls in C#
Stars: ✭ 48 (+140%)
Mutual labels:  httpclient
HttpClientFactory.Azure.Functions
[Archived] Azure Functions and Azure WebJobs binding extensions for HttpClientFactory. This is no longer the best approach: https://www.tpeczek.com/2019/10/alternative-approach-to-httpclient-in.html
Stars: ✭ 14 (-30%)
Mutual labels:  httpclient

cast

Build Status Go Report Card GoDoc

Cast is a http request library written in Golang.

This project is ready for production use and the master branch is always stable. But the API may be broken in the future release.

Getting started

dep ensure -add github.com/xiaojiaoyu100/cast

Usage

Generate a Cast

c, err := cast.New(cast.WithBaseURL("https://status.github.com"))

Generate a request

request := c.NewRequest()

Get

request := c.NewRequest().Get().WithPath("/api.json")
response, err := c.Do(request)

POST X-WWW-FORM-URLENCODED

request := c.NewRequest().Get().WithPath("/api.json").WithFormURLEncodedBody(body)
resp, err := c.Do(request)

POST JSON

request := c.NewRequest().Post().WithPath("/api.json").WithJSONBody(body)
response, err := c.Do(request)

POST XML

request := c.NewRequest().Post().WithPath("/api.json").WithXMLBody(body)
response, err := c.Do(request)

POST MULTIPART FORM DATA

request := c.NewRequest().Post().WithPath("/api.json").WithMultipartFormDataBody(formData)
resp, err := c.Do(request)

Timeout

c.NewRequest().WithTimeout(3 * time.Second)

Retry

cast.WithRetry(3)

Backoff

cast.WithXXXBackoffStrategy()

License

MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].