Skip to content

Base URL message factory #39

Closed
Closed
@jakzal

Description

@jakzal

Having to prefix all the calls with a base URL is annoying:

$factory->createRequest('GET', 'http://example.com/foo');

It could be avoided if we implemented something like the following that would include the base url for us:

$factory = new BaseUrlMessageFactory('http://example.com', new GuzzleMessageFactory());
$request = $factory->createRequest('GET', '/foo');

The advantage is that we wouldn't need to deal with base url in the place where the factory is used.

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions