• Resolved martijnoak3

    (@martijnoak3)


    Hi,

    I would like to use this plugin with Microsoft Flow. However, to make this work, the content-type of the request should be set to application/json. Now it’s set to application/x-www-form-urlencoded.

    Could you add an option to set this header?

    Thank you for building this. Love the idea and the solution!

    Regards,

    Martijn

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Mário Valney

    (@mariovalney)

    Hi @martijnoak3, how are you?

    As we are sending JSON in body request I guess it’s the best to send application/json header by default. So we released a new version (1.1.0) fixing that.

    If you want to change more args from request, you can use the filter ctz_post_request_args:

    function martijnoak3_ctz_post_request_args( $args ) {
        $args['headers']['another-header'] = 'another-header-value';
    
        return $args;
    }
    
    add_filter( 'ctz_post_request_args', 'martijnoak3_ctz_post_request_args' );

    I hope this new version can do what you want.
    Thanks for using our plugin and a review would be would be aprecciated.

    Thread Starter martijnoak3

    (@martijnoak3)

    Hi Mário,

    Thanks, I’ll check if this solves my issue. And of course I’ll give you a review.

    Regards,

    Martijn

    Thread Starter martijnoak3

    (@martijnoak3)

    It’s working great and I’m adding a five-star review. Please know that your solution also supports the HTTP Trigger in Microsoft Flow. This opens a world of possibilities to for people in the Microsoft Ecosystem.

    • This reply was modified 6 years, 11 months ago by martijnoak3.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add content type option’ is closed to new replies.