ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum IndexWebSphere Message Broker Supportcontect-type application/x-www-form-urlencoded

Post new topicReply to topic
contect-type application/x-www-form-urlencoded View previous topic :: View next topic
Author Message
matuwe
PostPosted: Thu Apr 02, 2020 1:35 am Post subject: contect-type application/x-www-form-urlencoded Reply with quote

Master

Joined: 05 Dec 2007
Posts: 289

Hi Kindly help. I need to call a rest service with content type application/x-www-form-urlencoded. Is it supported by IIB 10. According to trace the data still goes out as Json and not parsed as application/x-www-form-urlencoded"

I need to send these parameters

Code:


 SET OutputRoot.HTTPRequestHeader."Content-Type"= 'application/x-www-form-urlencoded';

SET OutputRoot.JSON.Data.grant_type='password';
       SET OutputRoot.JSON.Data.client_id='111';
       SET OutputRoot.JSON.Data.client_secret='343434';
       SET OutputRoot.JSON.Data.BANK_ID='hhh';
       SET OutputRoot.JSON.Data.username='user';
       SET OutputRoot.JSON.Data.password='pwd';



Kindly help, I am not sure how to handle this. [/code]
Back to top
View user's profile Send private message
kotagiriaashish
PostPosted: Thu Apr 02, 2020 4:27 am Post subject: Reply with quote

Disciple

Joined: 06 Aug 2011
Posts: 165

If you use JSON Domain, the content type will be overridden to Application/json though your requirement is not quite clear, if you intend to post a valid JSON with content type as application/x-www-form-urlencoded you can add the lines below to your code.

Code:
       DECLARE TempBlob BLOB;
       SET TempBlob = ASBITSTREAM(OutputRoot.JSON);
       SET OutputRoot.JSON = NULL;
       SET OutputRoot.BLOB.BLOB = TempBlob;
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker Supportcontect-type application/x-www-form-urlencoded
Jump to:



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP


Theme by Dustin Baccetti
Powered by phpBB 2001, 2002 phpBB Group

Copyright MQSeries.net. All rights reserved.