# Configuration.json in filesystem our over http?

**URL:** https://discourse.orthanc-server.org/t/configuration-json-in-filesystem-our-over-http/58
**Category:** Google Groups archive
**Created:** [April 23, 2014, 3:16pm UTC](https://discourse.orthanc-server.org/t/configuration-json-in-filesystem-our-over-http/58 "2014-04-23T15:16:26Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Vinicius\_Vollrath](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/v/ac8455/32.png) [@Vinicius\_Vollrath](https://discourse.orthanc-server.org/u/Vinicius_Vollrath)
#### Post date: [April 23, 2014, 3:16pm UTC](https://discourse.orthanc-server.org/t/configuration-json-in-filesystem-our-over-http/58/1 "2014-04-23T15:16:26Z")

</div>

Hi!

I want to change the source of the configuration file.

I am creating a manager with friendly interface in another app.

It is possible the Orthanc access settings via http?

In OrthancInitialization.cpp, line 78,  
boost::filesystem::path p = ORTHANC\_PATH;

I am a noob C++ coder.  
Which lib to use?  
Any advice would be most welcome.

Thanks,

Vinicius

---

<div class="post-metadata">

### Author: ![jodogne](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/jodogne/32/1511_2.png) [@jodogne](https://discourse.orthanc-server.org/u/jodogne)
#### Post date: [April 23, 2014, 3:30pm UTC](https://discourse.orthanc-server.org/t/configuration-json-in-filesystem-our-over-http/58/2 "2014-04-23T15:30:44Z")

</div>

Hi Vinicius,

You could have a look at the “Orthanc::HttpClient” class that is shipped with Orthanc and that is a wrapper around libcurl and JsonCpp.

A sample code can be found in the unit tests:  
[https://code.google.com/p/orthanc/source/browse/UnitTestsSources/RestApi.cpp?name=Orthanc-0.7.4#18](https://code.google.com/p/orthanc/source/browse/UnitTestsSources/RestApi.cpp?name=Orthanc-0.7.4#18)

In a nutshell, here is how to recover a JSON object from a HTTP request:

{  
HttpClient c;  
Json::Value v;  
c.SetUrl(“[http://orthanc.googlecode.com/hg/Resources/Configuration.json](http://orthanc.googlecode.com/hg/Resources/Configuration.json)”);  
c.Apply(v);  
// The configuration file is in the “v” variable  
}

HTH,  
Sébastien-

---

<div class="post-metadata">

### Author: ![Vinicius\_Vollrath](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/v/ac8455/32.png) [@Vinicius\_Vollrath](https://discourse.orthanc-server.org/u/Vinicius_Vollrath)
#### Post date: [April 23, 2014, 3:53pm UTC](https://discourse.orthanc-server.org/t/configuration-json-in-filesystem-our-over-http/58/3 "2014-04-23T15:53:18Z")

</div>

Very thanks Sébastien.
