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;








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










share|improve this question


























  • Share your code.

    – Evert
    Mar 27 at 0:33











  • done, any thoughts?

    – user1419810
    Mar 27 at 0:35

















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










share|improve this question


























  • Share your code.

    – Evert
    Mar 27 at 0:33











  • done, any thoughts?

    – user1419810
    Mar 27 at 0:35













0












0








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










share|improve this question
















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|improve this question















share|improve this question













share|improve this question




share|improve this question








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

















  • 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












2 Answers
2






active

oldest

votes


















0














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'];
?>





share|improve this answer

























  • 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


















0














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






share|improve this answer



























    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
    );



    );













    draft saved

    draft discarded


















    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









    0














    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'];
    ?>





    share|improve this answer

























    • 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















    0














    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'];
    ?>





    share|improve this answer

























    • 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













    0












    0








    0







    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'];
    ?>





    share|improve this answer













    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'];
    ?>






    share|improve this answer












    share|improve this answer



    share|improve this answer










    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

















    • 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













    0














    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






    share|improve this answer





























      0














      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






      share|improve this answer



























        0












        0








        0







        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






        share|improve this answer













        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







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 27 at 23:48









        user1419810user1419810

        4567 silver badges20 bronze badges




        4567 silver badges20 bronze badges






























            draft saved

            draft discarded
















































            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.




            draft saved


            draft discarded














            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





















































            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







            Popular posts from this blog

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

            Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript