Skip to content

Use https:// protocol for Postmark API - #15

Merged
hkdobrev merged 3 commits into
masterfrom
secure-uri
Sep 26, 2014
Merged

Use https:// protocol for Postmark API#15
hkdobrev merged 3 commits into
masterfrom
secure-uri

Conversation

@hkdobrev

Copy link
Copy Markdown
Contributor

This introduces these new methods:

  • Api::is_secure()
  • Api::set_secure()
  • Api::get_send_uri()

They could be used to get/set the secure flag and get the send URI based on that flag.

The new default is to use the https:// protocol for the Postmark API.

You could use the previous default http:// with:

$transport = Swift_PostmarkTransport::newInstance('your api key');
$transport->api()->set_secure(false);

Resolves #7.

This introduces the new methods:
- `Api::get_is_secure()`
- `Api::set_is_secure()`
- `Api::get_send_uri()`

They could be used to get/set the secure flag and get the send URI based
on that flag.

The new default is to use the `https://` protocol for the Postmark API.

You could use the previous default `http://` with:

    $transport = Swift_PostmarkTransport::newInstance('your api key');
    $transport->api()->set_is_secure(false);

Resolves #7.
We are now able to mock the `get_send_uri()` method during the tests and
since it is not in a constant we could set to whatever runtime value we
need. This way we can test the wrong JSON case better.
@hkdobrev hkdobrev added this to the 0.1.x milestone Sep 26, 2014
@hkdobrev

Copy link
Copy Markdown
Contributor Author

@jaketoolson Since you are the one who suggested #7, what do you think about that?

@hkdobrev hkdobrev modified the milestones: 0.2.x, 0.1.x Sep 26, 2014
The interface is now more consistent with the Symfony naming conventions.
@hkdobrev

Copy link
Copy Markdown
Contributor Author

Updated the interface with better naming.

/cc @dkyosev

@dkyosev

dkyosev commented Sep 26, 2014

Copy link
Copy Markdown

LGTM

hkdobrev added a commit that referenced this pull request Sep 26, 2014
Use https:// protocol for Postmark API
@hkdobrev
hkdobrev merged commit 415873b into master Sep 26, 2014
@hkdobrev
hkdobrev deleted the secure-uri branch September 26, 2014 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SSL/HTTPS

2 participants