# Problems with js-ipfs-http-client

**URL:** <https://discuss.ipfs.tech/t/problems-with-js-ipfs-http-client/8559>\
**Category:** js-ipfs\
**Tags:** js-ipfs\
**Created:** [July 1, 2020, 10:33am UTC](https://discuss.ipfs.tech/t/problems-with-js-ipfs-http-client/8559 "2020-07-01T10:33:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wangGeneral](https://avatars.discourse-cdn.com/v4/letter/w/22d042/32.png) [@wangGeneral](https://discuss.ipfs.tech/u/wangGeneral)\
**Post date:** [July 1, 2020, 10:33am UTC](https://discuss.ipfs.tech/t/problems-with-js-ipfs-http-client/8559/1 "2020-07-01T10:33:41Z")

</div>

### Hello everyone!

```nohighlight
  I had some problems when using js-ipfs-http-client, and I started to see cross-domain,
After I added the request header, there was no such problem, I thought it could be used normally,
When I called ipfs.get for the first time, I got the return value successfully, but the following
problems really bothered me, Then I want to upload a file and calling ipfs.add returns error 404.
Please tell me how can I solve it?

```

 ![image](https://us1.discourse-cdn.com/flex020/uploads/ipfs1/original/2X/9/9ce3c12e865c66c0b0a9a4dccb9f12834eadb524.png)

---

<div class="post-metadata">

**Author:** ![achingbrain](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/achingbrain/32/3083_2.png) [@achingbrain](https://discuss.ipfs.tech/u/achingbrain)\
**Post date:** [July 3, 2020, 9:18am UTC](https://discuss.ipfs.tech/t/problems-with-js-ipfs-http-client/8559/2 "2020-07-03T09:18:30Z")

</div>

Have you configured the endpoint you’re trying to hit correctly? The API typically listens on port 5001.

There’s an example here: [https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs-http-client/examples/files-api/files-api.js](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs-http-client/examples/files-api/files-api.js)

---

<div class="post-metadata">

**Author:** ![wangGeneral](https://avatars.discourse-cdn.com/v4/letter/w/22d042/32.png) [@wangGeneral](https://discuss.ipfs.tech/u/wangGeneral)\
**Post date:** [July 6, 2020, 5:46am UTC](https://discuss.ipfs.tech/t/problems-with-js-ipfs-http-client/8559/3 "2020-07-06T05:46:02Z")

</div>

### thank! This problem has been solved
