Custom HTTP header rsponceHow do I download a file over HTTP using Python?HTTP GET request in JavaScript?Are HTTPS URLs encrypted?HTTP GET with request bodyHTTP status code for update and delete?How to use java.net.URLConnection to fire and handle HTTP requestsCustom HTTP headers : naming conventionsAre HTTP headers case-sensitive?How is an HTTP POST request made in node.js?How are parameters sent in an HTTP POST request?
Being told my "network" isn't PCI Complaint. I don't even have a server! Do I have to comply?
How do I respond appropriately to an overseas company that obtained a visa for me without hiring me?
How to trick a fairly simplistic kill-counter?
When did J.K. Rowling decide to make Ron and Hermione a couple?
Move label of an angle in Tikz
Who's behind community AMIs on Amazon EC2?
Backpacking with incontinence
Does the use of a new concept require a prior definition?
How were x-ray diffraction patterns deciphered before computers?
If I buy and download a game through second Nintendo account do I own it on my main account too?
Plotting Chebyshev polynomials using PolarPlot and FilledCurve
If a Shadow Magic sorcerer casts Darkness using the Eyes of the Dark feature, can they cast another spell that requires concentration?
Pre-Greek θάλασσα "thalassa" and Turkish talaz
Gold Battle KoTH
What's the term for a group of people who enjoy literary works?
How do people drown while wearing a life jacket?
Accurately recalling the key - can everyone do it?
Does KNN have a loss function?
How do I solve such questions on paramagnetism and ferromagnetism?
How did Biff return to 2015 from 1955 without a lightning strike?
How is Sword Coast North governed?
"Will flex for food". What does this phrase mean?
Why are Star Wars Rebel Alliance ships named after letters from the Latin alphabet?
How to get maximum number that newcount can hold?
Custom HTTP header rsponce
How do I download a file over HTTP using Python?HTTP GET request in JavaScript?Are HTTPS URLs encrypted?HTTP GET with request bodyHTTP status code for update and delete?How to use java.net.URLConnection to fire and handle HTTP requestsCustom HTTP headers : naming conventionsAre HTTP headers case-sensitive?How is an HTTP POST request made in node.js?How are parameters sent in an HTTP POST request?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I'm dealing with an api that needs me to provide a response to verify a webhook setup. According to their docs the response is expected to take the format of the following with a verify code posted to the end webhook url:
200 OK
example-code--9223-62bdcc222345
I've tried echoing out both 200 OK and the example code in the response page with the following:
echo '200 OK<br>';
echo $_GET['verify'];
however this generates a "invalid response" message which makes me think I need to provide the response in the http header, does anyone know how to do this?
Thanks,
Matt
http
add a comment |
I'm dealing with an api that needs me to provide a response to verify a webhook setup. According to their docs the response is expected to take the format of the following with a verify code posted to the end webhook url:
200 OK
example-code--9223-62bdcc222345
I've tried echoing out both 200 OK and the example code in the response page with the following:
echo '200 OK<br>';
echo $_GET['verify'];
however this generates a "invalid response" message which makes me think I need to provide the response in the http header, does anyone know how to do this?
Thanks,
Matt
http
Share your code.
– Evert
Mar 27 at 0:33
done, any thoughts?
– user1419810
Mar 27 at 0:35
add a comment |
I'm dealing with an api that needs me to provide a response to verify a webhook setup. According to their docs the response is expected to take the format of the following with a verify code posted to the end webhook url:
200 OK
example-code--9223-62bdcc222345
I've tried echoing out both 200 OK and the example code in the response page with the following:
echo '200 OK<br>';
echo $_GET['verify'];
however this generates a "invalid response" message which makes me think I need to provide the response in the http header, does anyone know how to do this?
Thanks,
Matt
http
I'm dealing with an api that needs me to provide a response to verify a webhook setup. According to their docs the response is expected to take the format of the following with a verify code posted to the end webhook url:
200 OK
example-code--9223-62bdcc222345
I've tried echoing out both 200 OK and the example code in the response page with the following:
echo '200 OK<br>';
echo $_GET['verify'];
however this generates a "invalid response" message which makes me think I need to provide the response in the http header, does anyone know how to do this?
Thanks,
Matt
http
http
edited Mar 27 at 0:35
user1419810
asked Mar 27 at 0:31
user1419810user1419810
4567 silver badges20 bronze badges
4567 silver badges20 bronze badges
Share your code.
– Evert
Mar 27 at 0:33
done, any thoughts?
– user1419810
Mar 27 at 0:35
add a comment |
Share your code.
– Evert
Mar 27 at 0:33
done, any thoughts?
– user1419810
Mar 27 at 0:35
Share your code.
– Evert
Mar 27 at 0:33
Share your code.
– Evert
Mar 27 at 0:33
done, any thoughts?
– user1419810
Mar 27 at 0:35
done, any thoughts?
– user1419810
Mar 27 at 0:35
add a comment |
2 Answers
2
active
oldest
votes
When the documentation says you need to respond with 200 OK
, it likely means that it's talking about the HTTP status code. If this is the first time you heard of HTTP status codes, the most famous example is 404 Not Found
.
Since you're using PHP, the default status code is already 200 OK
, so just based on your example I think you should be able to change your code to this to make it work:
<?php
echo $_GET['verify'];
?>
Afraid that doesn't work, would it be possible to add the code to the http response header or is that impossible?
– user1419810
Mar 27 at 0:42
Can you verify your script is correct by opening it and adding your own (fake) verify code? if it's all working as expected, i would say it's likely that the documentation is wrong, or you did a poor job transcribing the documentation.
– Evert
Mar 27 at 1:03
add a comment |
Ok, so for anyone else facing this issue it turns out I needed to provide the response as a JSO string instead, i.e.
<?php
$data_string = json_encode($_GET['verify']);
echo $data_string;
?>
and not
<?php
echo $_GET['verify'];
?>
Really hope this helps save someone some time.
Matt
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55368110%2fcustom-http-header-rsponce%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
When the documentation says you need to respond with 200 OK
, it likely means that it's talking about the HTTP status code. If this is the first time you heard of HTTP status codes, the most famous example is 404 Not Found
.
Since you're using PHP, the default status code is already 200 OK
, so just based on your example I think you should be able to change your code to this to make it work:
<?php
echo $_GET['verify'];
?>
Afraid that doesn't work, would it be possible to add the code to the http response header or is that impossible?
– user1419810
Mar 27 at 0:42
Can you verify your script is correct by opening it and adding your own (fake) verify code? if it's all working as expected, i would say it's likely that the documentation is wrong, or you did a poor job transcribing the documentation.
– Evert
Mar 27 at 1:03
add a comment |
When the documentation says you need to respond with 200 OK
, it likely means that it's talking about the HTTP status code. If this is the first time you heard of HTTP status codes, the most famous example is 404 Not Found
.
Since you're using PHP, the default status code is already 200 OK
, so just based on your example I think you should be able to change your code to this to make it work:
<?php
echo $_GET['verify'];
?>
Afraid that doesn't work, would it be possible to add the code to the http response header or is that impossible?
– user1419810
Mar 27 at 0:42
Can you verify your script is correct by opening it and adding your own (fake) verify code? if it's all working as expected, i would say it's likely that the documentation is wrong, or you did a poor job transcribing the documentation.
– Evert
Mar 27 at 1:03
add a comment |
When the documentation says you need to respond with 200 OK
, it likely means that it's talking about the HTTP status code. If this is the first time you heard of HTTP status codes, the most famous example is 404 Not Found
.
Since you're using PHP, the default status code is already 200 OK
, so just based on your example I think you should be able to change your code to this to make it work:
<?php
echo $_GET['verify'];
?>
When the documentation says you need to respond with 200 OK
, it likely means that it's talking about the HTTP status code. If this is the first time you heard of HTTP status codes, the most famous example is 404 Not Found
.
Since you're using PHP, the default status code is already 200 OK
, so just based on your example I think you should be able to change your code to this to make it work:
<?php
echo $_GET['verify'];
?>
answered Mar 27 at 0:37
EvertEvert
44.6k15 gold badges74 silver badges131 bronze badges
44.6k15 gold badges74 silver badges131 bronze badges
Afraid that doesn't work, would it be possible to add the code to the http response header or is that impossible?
– user1419810
Mar 27 at 0:42
Can you verify your script is correct by opening it and adding your own (fake) verify code? if it's all working as expected, i would say it's likely that the documentation is wrong, or you did a poor job transcribing the documentation.
– Evert
Mar 27 at 1:03
add a comment |
Afraid that doesn't work, would it be possible to add the code to the http response header or is that impossible?
– user1419810
Mar 27 at 0:42
Can you verify your script is correct by opening it and adding your own (fake) verify code? if it's all working as expected, i would say it's likely that the documentation is wrong, or you did a poor job transcribing the documentation.
– Evert
Mar 27 at 1:03
Afraid that doesn't work, would it be possible to add the code to the http response header or is that impossible?
– user1419810
Mar 27 at 0:42
Afraid that doesn't work, would it be possible to add the code to the http response header or is that impossible?
– user1419810
Mar 27 at 0:42
Can you verify your script is correct by opening it and adding your own (fake) verify code? if it's all working as expected, i would say it's likely that the documentation is wrong, or you did a poor job transcribing the documentation.
– Evert
Mar 27 at 1:03
Can you verify your script is correct by opening it and adding your own (fake) verify code? if it's all working as expected, i would say it's likely that the documentation is wrong, or you did a poor job transcribing the documentation.
– Evert
Mar 27 at 1:03
add a comment |
Ok, so for anyone else facing this issue it turns out I needed to provide the response as a JSO string instead, i.e.
<?php
$data_string = json_encode($_GET['verify']);
echo $data_string;
?>
and not
<?php
echo $_GET['verify'];
?>
Really hope this helps save someone some time.
Matt
add a comment |
Ok, so for anyone else facing this issue it turns out I needed to provide the response as a JSO string instead, i.e.
<?php
$data_string = json_encode($_GET['verify']);
echo $data_string;
?>
and not
<?php
echo $_GET['verify'];
?>
Really hope this helps save someone some time.
Matt
add a comment |
Ok, so for anyone else facing this issue it turns out I needed to provide the response as a JSO string instead, i.e.
<?php
$data_string = json_encode($_GET['verify']);
echo $data_string;
?>
and not
<?php
echo $_GET['verify'];
?>
Really hope this helps save someone some time.
Matt
Ok, so for anyone else facing this issue it turns out I needed to provide the response as a JSO string instead, i.e.
<?php
$data_string = json_encode($_GET['verify']);
echo $data_string;
?>
and not
<?php
echo $_GET['verify'];
?>
Really hope this helps save someone some time.
Matt
answered Mar 27 at 23:48
user1419810user1419810
4567 silver badges20 bronze badges
4567 silver badges20 bronze badges
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55368110%2fcustom-http-header-rsponce%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Share your code.
– Evert
Mar 27 at 0:33
done, any thoughts?
– user1419810
Mar 27 at 0:35