actor
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
@@ -44,7 +45,7 @@ type customerLookupResponse struct {
|
||||
// returns the parsed email preferences. Returns nil, nil when the profile
|
||||
// is not found (unknown email -> allow all).
|
||||
func (c *ProfilePreferencesClient) fetchPreferences(ctx context.Context, email string) (*emailPreferencesResponse, error) {
|
||||
url := fmt.Sprintf("%s/by-email/%s", c.baseURL, email)
|
||||
url := fmt.Sprintf("%s/by-email/%s", c.baseURL, url.PathEscape(email))
|
||||
req, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user