# README
xmlrpc
XMLRPC Go library is designed to make it easy to create an XMLRPC client, making method calls and receiving method responses.
The library is compliant with the XML-RPC specification published by http://www.xmlrpc.org/.
Requirements
- Go 1.9 or newer to compile
- Go dep tool to manage dependencies
- gometalinter tool to run Go lint tools and normalise their output
Installation
The recommended way to install this library is using go get
:
go get -u github.com/onego-project/xmlrpc
Usage examples
Short usage example expects xml-rpc server running at localhost:8000
with method pow
which takes 2 integers and returns one int value.
package main
import (
"github.com/onego-project/xmlrpc"
"context"
"fmt"
)
func main() {
client := xmlrpc.NewClient("http://localhost:8000/")
ctx := context.TODO()
result, err := client.Call(ctx, "pow", 3, 4)
if err != nil {
fmt.Printf("Error: %s\n", err)
return
}
fmt.Println("Result kind:", result.Kind())
fmt.Println("Result:", result.ResultInt())
}
Contributing
- Fork xmlrpc library
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
# Functions
IsTemporary returns true if err is temporary.
IsTimeout returns true if err is caused by timeout.
NewClient is an XML-RPC client constructor.
# Constants
Constants representing XML-RPC data types.
Constants representing XML-RPC data types.
Constants representing XML-RPC data types.
Constants representing XML-RPC data types.
Constants representing XML-RPC data types.
Constants representing XML-RPC data types.
Constants representing XML-RPC data types.
Constants representing XML-RPC data types.
Constants representing XML-RPC data types.
# Variables
LogErrorFunc can be set from outside the library to allow error logging.
# Type aliases
Kind represents a data types available in XML-RPC standard.