blob: 433d05c3463e97b5580ee8942785710992969a27 [file] [log] [blame] [view]
jfarrell3da09062014-10-08 01:18:07 -04001# Thrift Erlang Software Library #
Bryan Duxburydef30a62009-04-08 00:19:37 +00002
jfarrell3da09062014-10-08 01:18:07 -04003## License ##
Bryan Duxburydef30a62009-04-08 00:19:37 +00004
5Licensed to the Apache Software Foundation (ASF) under one
6or more contributor license agreements. See the NOTICE file
7distributed with this work for additional information
8regarding copyright ownership. The ASF licenses this file
9to you under the Apache License, Version 2.0 (the
10"License"); you may not use this file except in compliance
11with the License. You may obtain a copy of the License at
12
13 http://www.apache.org/licenses/LICENSE-2.0
14
15Unless required by applicable law or agreed to in writing,
16software distributed under the License is distributed on an
17"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18KIND, either express or implied. See the License for the
19specific language governing permissions and limitations
20under the License.
21
jfarrell3da09062014-10-08 01:18:07 -040022## Release Notes ##
23
24### 0.9.2 ###
25
26as of 0.9.2 struct and function naming conventions have changed. to retain the
27old naming conventions (for backwards compatibility) use the compiler option
28`legacynames`
29
30## Example ##
Bryan Duxburydef30a62009-04-08 00:19:37 +000031
David Reiss702019c2008-06-11 00:58:13 +000032Example session using thrift_client:
33
Jens Geyer1f1c2062015-09-03 20:53:44 +020034```erl
Roger Meier4702fe62015-02-15 21:17:30 +0100351> {ok, C0} = thrift_client_util:new("localhost", 9090, thrift_test_thrift, []), ok.
David Reiss3f660a42010-08-30 22:05:29 +000036ok
372> {C1, R1} = thrift_client:call(C0, testVoid, []), R1.
David Reiss702019c2008-06-11 00:58:13 +000038{ok,ok}
David Reiss3f660a42010-08-30 22:05:29 +0000393> {C2, R2} = thrift_client:call(C1, testVoid, [asdf]), R2.
David Reiss702019c2008-06-11 00:58:13 +000040{error,{bad_args,testVoid,[asdf]}}
David Reiss3f660a42010-08-30 22:05:29 +0000414> {C3, R3} = thrift_client:call(C2, testI32, [123]), R3.
David Reiss702019c2008-06-11 00:58:13 +000042{ok,123}
David Reiss3f660a42010-08-30 22:05:29 +0000435> {C4, R4} = thrift_client:call(C3, testOneway, [1]), R4.
David Reiss702019c2008-06-11 00:58:13 +000044{ok,ok}
David Reiss3f660a42010-08-30 22:05:29 +0000456> {C5, R5} = thrift_client:call(C4, testXception, ["foo"]), R5.
David Reiss702019c2008-06-11 00:58:13 +000046{error,{no_function,testXception}}
David Reiss3f660a42010-08-30 22:05:29 +0000477> {C6, R6} = thrift_client:call(C5, testException, ["foo"]), R6.
David Reiss702019c2008-06-11 00:58:13 +000048{ok,ok}
David Reiss3f660a42010-08-30 22:05:29 +0000498> {C7, R7} = (catch thrift_client:call(C6, testException, ["Xception"])), R7.
50{exception,{xception,1001,<<"Xception">>}}
Jens Geyer1f1c2062015-09-03 20:53:44 +020051```