GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - andelf/go-curl: golang curl(libcurl) binding.

BranchesTags
Open more actions menu

Latest commit

 

History

145 Commits
145 Commits

Folders and files

NameName
Last commit message
Last commit date
examples
examples
 
 
misc
misc
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
LICENSE
LICENSE
 
 
NOTICE
NOTICE
 
 
README.md
README.md
 
 
c-callback.c
c-callback.c
 
 
callback.go
callback.go
 
 
callback.h
callback.h
 
 
compat.h
compat.h
 
 
const.go
const.go
 
 
const_gen.go
const_gen.go
 
 
core.go
core.go
 
 
core_test.go
core_test.go
 
 
easy.go
easy.go
 
 
easy_test.go
easy_test.go
 
 
go.mod
go.mod
 
 
logging.go
logging.go
 
 
logging_test.go
logging_test.go
 
 
multi.go
multi.go
 
 
share.go
share.go
 
 

Repository files navigation

go-curl

Build Status

go-curl is a GoLang interface to libcurl, the multiprotocol file transfer library. Similar to the HTTP support in [net/http] (https://pkg.go.dev/net/http), go-curl can be used to fetch objects from a Go program. While go-curl can provide simple fetches, it also exposes most of the functionality of libcurl, including:

  • Speed - libcurl is very fast.
  • Multiple protocol (not just HTTP).
  • SSL, authentication and proxy support.
  • Support for libcurl's callbacks.

This said, libcurl API can be less easy to learn than net/http.

LICENSE

go-curl is licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.html).

Current Development Status

  • currently stable
  • READ, WRITE, HEADER, PROGRESS function callback
  • a Multipart Form supports file uploading
  • Most curl_easy_setopt option
  • partly implement share & multi interface
  • new callback function prototype

Requirements

  • Any version of Go
  • libcurl 7.x or higher (including development headers and static/dynamic libs)
  • Python 3 (used only by configure scripts)

How to Install

$ go get -u github.com/andelf/go-curl

Current Status

  • Linux x64
    • passed go1 (ArchLinux)
  • Windows x86
    • passed go1 (win7, mingw-gcc 4.5.2, curl 7.22.0)
  • Mac OS
    • passed go1 (Mac OS X 10.7.3, curl 7.21.4)

NOTE: Above information is outdated ("help wanted")

Sample Program

Following comes from examples/https.go Simply type go run ./examples/https.go to execute.

package main

import (
	curl "github.com/andelf/go-curl"
)

func main() {
	easy := curl.EasyInit()
	defer easy.Cleanup()
	if easy != nil {
		easy.Setopt(curl.OPT_URL, "https://baidu.com/")
		easy.Perform()
	}
}

See also the examples directory!

About

golang curl(libcurl) binding.

Resources

Readme
Apache-2.0 license
Activity

Stars

520 stars

Watchers

19 watching

Forks

138 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.