Skip to content

Commit

Permalink
send post body as form-encoded
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronpk committed May 8, 2017
1 parent 9edfe6e commit 3e37fbb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/p3k/WebSub/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public function subscribe($hub, $topic, $callback, $options=[]) {
if(isset($options['secret'])) {
$params['hub.secret'] = $options['secret'];
}
$response = $this->http->post($hub, $params);
$response = $this->http->post($hub, http_build_query($params));

// TODO: Check for HTTP 307/308 and subscribe at the new location

Expand All @@ -205,7 +205,7 @@ public function unsubscribe($hub, $topic, $callback) {
'hub.topic' => $topic,
'hub.callback' => $callback,
];
$response = $this->http->post($hub, $params);
$response = $this->http->post($hub, http_build_query($params));

// TODO: Check for HTTP 307/308 and unsubscribe at the new location

Expand Down

0 comments on commit 3e37fbb

Please sign in to comment.