Commit Graph

41 Commits

Author SHA1 Message Date
Ross Jones
7d8262307c fix: use https URI when multiaddress specifies tls (#177)
Currently any clients created through `NewApiWithClient` will make a
HTTP request to the api, even if the multiaddress specifies TLS or (the
deprecated multiaddr option) https.

This commit addresses this by having NewApiWithClient iterate the
available protocols for the multiaddress, specifying the URL proto as
https if it finds TLS or HTTPS is specified. The default continues to be
http for those multiaddresses that do not specify these options.

Should resolve #176

This commit was moved from ipfs/go-ipfs-http-client@7e1de1f7cc
2023-05-15 18:18:51 +02:00
Jorropo
8bebfc00b7 chore: migrate from go-libipfs to boxo
This commit was moved from ipfs/go-ipfs-http-client@ae996cbe5a
2023-04-18 15:31:48 +02:00
Jorropo
75b6f45f76 chore: bumps for Kubo 0.18 and Routing API with stub for Put
This commit was moved from ipfs/go-ipfs-http-client@c076c3cb71
2023-02-10 03:36:15 +01:00
web3-bot
0fff1d5d8e stop using the deprecated io/ioutil package
This commit was moved from ipfs/go-ipfs-http-client@026ba730a1
2022-09-23 07:43:33 +00:00
Marten Seemann
ea2a35686d fix staticcheck
This commit was moved from ipfs/go-ipfs-http-client@4461a0bb95
2021-05-15 18:21:24 -07:00
godcong
be8f80237d fix path miss in windows/add a new api create function (#23)
* fix path was not always correct in windows

* add new api create function for if the port was different with api file.

* Update api.go

remove no need commit


This commit was moved from ipfs/go-ipfs-http-client@8c87debb12
2019-08-12 16:16:47 -07:00
Łukasz Magiera
8d953a7359 Use interface for RequestBuilder
This commit was moved from ipfs/go-ipfs-http-client@0534b7ca83
2019-05-10 15:38:20 +02:00
Alex
efe3b6054e api: call NewURLApiWithClient from NewApiWithClient
This commit was moved from ipfs/go-ipfs-http-client@aea6890f36
2019-05-01 16:00:48 -07:00
Alex
d8c286bb15 api: remove WithAuthorization, DirectAPI client, instantiate header map
This commit was moved from ipfs/go-ipfs-http-client@9c7d495b03
2019-05-01 13:41:15 -07:00
Alex
11a990c7b1 api: expose headers via HttpApi, copy headers during request build
This commit was moved from ipfs/go-ipfs-http-client@033befdef3
2019-05-01 13:13:59 -07:00
Alex
3b02ea4646 api: add authenticated transport, and direct connection
This commit was moved from ipfs/go-ipfs-http-client@d04afa02b0
2019-04-09 19:53:07 -07:00
Edgar Lee
1c07bed904 Export (*HttpApi).request to enable building custom requests
This commit was moved from ipfs/go-ipfs-http-client@8c9ed7dbc2
2019-04-01 17:13:39 -07:00
Steven Allen
c6f704b453 return an error when the API file isn't found
fixes #7


This commit was moved from ipfs/go-ipfs-http-client@897d1b1bcd
2019-03-29 13:38:28 +00:00
Steven Allen
e76ecd3038 nit: return concrete types
This is generally considered the "better" way to do things in go. It also allows
us to expose functions like `request` at some point without changing the API
interface itself.


This commit was moved from ipfs/go-ipfs-http-client@524e5d82e6
2019-03-29 13:38:28 +00:00
Łukasz Magiera
ad844e3d0b response: simplify Decode
This commit was moved from ipfs/go-ipfs-http-client@adbfda4c1c
2019-02-20 16:52:41 +01:00
Łukasz Magiera
f6a3a4fb2d gofmt
This commit was moved from ipfs/go-ipfs-http-client@65cd935e13
2019-02-19 23:28:39 +01:00
Łukasz Magiera
aa4d6e16f1 Add some docs to constructors
This commit was moved from ipfs/go-ipfs-http-client@e34cd600e6
2019-02-19 23:26:34 +01:00
Łukasz Magiera
f34788e6ee cleanup Swarm.Peers
This commit was moved from ipfs/go-ipfs-http-client@fd7858dc57
2019-02-19 23:11:08 +01:00
Łukasz Magiera
27aa13fe44 return errors from constructor methods
This commit was moved from ipfs/go-ipfs-http-client@dbee4e27aa
2019-02-19 21:53:17 +01:00
Łukasz Magiera
745bf92506 gofmt
This commit was moved from ipfs/go-ipfs-http-client@f3c2c35086
2019-02-18 17:32:40 +01:00
Łukasz Magiera
7be8d01ee7 response: option to disable output draining
This commit was moved from ipfs/go-ipfs-http-client@9f3d9635fa
2019-02-18 17:27:12 +01:00
Łukasz Magiera
e1b14d78c7 Implement missing methods
This commit was moved from ipfs/go-ipfs-http-client@b76413dfe5
2019-02-14 18:45:19 +01:00
Łukasz Magiera
ef5bf40df1 Update imports to use extracted interface
This commit was moved from ipfs/go-ipfs-http-client@fad467bc43
2019-02-12 12:05:24 +01:00
Łukasz Magiera
c543354b17 Check for redirects
This commit was moved from ipfs/go-ipfs-http-client@19c65db4f0
2019-02-06 22:36:30 +01:00
Łukasz Magiera
88139ddc50 dag: Interface updates
This commit was moved from ipfs/go-ipfs-http-client@7bea2efb45
2019-02-04 19:45:35 +01:00
Łukasz Magiera
b7e258cc10 Reimplement DAG as DAGService
This commit was moved from ipfs/go-ipfs-http-client@f34a5f6d25
2019-01-21 21:31:09 +01:00
Łukasz Magiera
c2e0872f6d Implement PubSub Api
This commit was moved from ipfs/go-ipfs-http-client@7abddda1d3
2019-01-15 18:19:50 +01:00
Łukasz Magiera
cae0ff2379 Implement Swarm Api
This commit was moved from ipfs/go-ipfs-http-client@01105690d2
2019-01-15 17:36:35 +01:00
Łukasz Magiera
ed9f2dd091 Implement DHT Api
This commit was moved from ipfs/go-ipfs-http-client@c77355067a
2019-01-15 17:01:33 +01:00
Łukasz Magiera
c213e26542 Unixfs.Add progress events
This commit was moved from ipfs/go-ipfs-http-client@2f3a77b686
2019-01-09 21:55:45 +01:00
Łukasz Magiera
101910f04e Object.New
This commit was moved from ipfs/go-ipfs-http-client@60321ed42f
2019-01-09 09:22:10 +01:00
Łukasz Magiera
00597e6dff Dag.Put
This commit was moved from ipfs/go-ipfs-http-client@3217104469
2019-01-09 09:04:22 +01:00
Łukasz Magiera
af197cb6d9 api.WithOption
This commit was moved from ipfs/go-ipfs-http-client@634b00bf1a
2019-01-08 14:46:52 +01:00
Łukasz Magiera
a6636aac59 Imprement partian Pin API
This commit was moved from ipfs/go-ipfs-http-client@dbf90eac67
2019-01-08 03:18:21 +01:00
Łukasz Magiera
cf74d39160 Partial Key API, ApiAddr funcion
This commit was moved from ipfs/go-ipfs-http-client@0ffdef1592
2019-01-08 02:07:46 +01:00
Łukasz Magiera
ab89e0abf9 Partial Unixfs.Add
This commit was moved from ipfs/go-ipfs-http-client@44696b84f5
2019-01-08 00:30:22 +01:00
Łukasz Magiera
e8da6e2cf9 Block API
This commit was moved from ipfs/go-ipfs-http-client@d0c98b870e
2019-01-07 23:44:43 +01:00
Łukasz Magiera
fe4c9fd803 Skeleton for tests
This commit was moved from ipfs/go-ipfs-http-client@dfbe0026ad
2018-12-30 04:24:09 +01:00
Łukasz Magiera
16e97bf5e8 It builds
This commit was moved from ipfs/go-ipfs-http-client@a23d794e5f
2018-12-21 18:44:44 +01:00
Łukasz Magiera
6c927fd962 Partial ipld node impl
This commit was moved from ipfs/go-ipfs-http-client@df916c7849
2018-11-06 14:41:45 +01:00
Łukasz Magiera
6d85aff407 Initial structure, path stuff
This commit was moved from ipfs/go-ipfs-http-client@93943f7f56
2018-11-06 13:13:15 +01:00