HomePhabricator

Allow ConduitClient to specify an explicit Host

Description

Allow ConduitClient to specify an explicit Host

Summary:
Ref T2783. To query a repository, we want to connect to a node which hosts it, but also connect using the correct instance hostname.

Allow ConduitClient to specify an explicit hostname.

Test Plan:
Used a script like this to verify that setHost() is impactful:

<?php

require_once 'scripts/__init_script__.php';

$response = id(new ConduitClient('http://127.0.0.1/'))
  ->setHost('local.phacility.com')
  ->callMethodSynchronous('conduit.ping', array());

var_dump($response);

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T2783

Differential Revision: https://secure.phabricator.com/D10960