Use https:// protocol for Postmark API - #15
Merged
Merged
Conversation
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.
Contributor
Author
|
@jaketoolson Since you are the one who suggested #7, what do you think about that? |
The interface is now more consistent with the Symfony naming conventions.
Contributor
Author
|
Updated the interface with better naming. /cc @dkyosev |
hkdobrev
added a commit
that referenced
this pull request
Sep 26, 2014
Use https:// protocol for Postmark API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This introduces these new methods:
Api::is_secure()Api::set_secure()Api::get_send_uri()They could be used to get/set the
secureflag 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:Resolves #7.