UI::WebDialog with POST doesn't put content-type field in header


Hi, we want to send access tokens and other parameters to our web server via POST because only this type of method is supported on server side. We chose the WebDialog for this task because HtmlDialog doesn’t provide any post method. I checked the message posted by the dialog and saw that there was no content-type field in the
http header and our servers respond to this kind of request with error (according to https://tools.ietf.org/html/rfc7231#section- the post should include content-type).
Could you please help me out how could we send a http post in WebDialog with content-type? Is there a way to include header fields via the API? Or is it possible to use HtmlDialog for this request also?



Did you see http://ruby.sketchup.com/Sketchup/Http/Request.html?


Thanks :slight_smile: Ok, we could use a simple a http request for a one shot request but we need the browser functionality of the webdialog because the user want to browse the site after logged in. So is there a way to use this browser (webdialog or htmldialog) and send valid post requests?


This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.