{"id":2449,"date":"2023-06-09T14:16:40","date_gmt":"2023-06-09T21:16:40","guid":{"rendered":"https:\/\/cknotes.com\/?p=2449"},"modified":"2025-05-19T15:32:23","modified_gmt":"2025-05-19T22:32:23","slug":"generate-chilkat-code-from-postman","status":"publish","type":"post","link":"https:\/\/cknotes.com\/generate-chilkat-code-from-postman\/","title":{"rendered":"Generate Chilkat Code from PostMan"},"content":{"rendered":"<p>This is a way to generate Chilkat source code from a working PostMan request:<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\n<li>Open Postman: Launch the Postman application on your computer.<\/li>\n<li>Create or Import a Request: Create a new request or import an existing one that you want to inspect the raw HTTP request for.<\/li>\n<li>Send the Request: Click the &#8220;Send&#8221; button to send the request to the server.<\/li>\n<li>After sending the request, view the raw HTTP request by switching to the &#8220;Console&#8221; tab at the bottom of the user interface.\u00a0 For example: <img loading=\"lazy\" decoding=\"async\" width=\"1430\" height=\"337\" class=\"alignnone wp-image-2450 size-full\" src=\"https:\/\/cknotes.com\/wp-content\/uploads\/2023\/06\/Pasted.png\" srcset=\"https:\/\/cknotes.com\/wp-content\/uploads\/2023\/06\/Pasted.png 1430w, https:\/\/cknotes.com\/wp-content\/uploads\/2023\/06\/Pasted-300x71.png 300w, https:\/\/cknotes.com\/wp-content\/uploads\/2023\/06\/Pasted-1024x241.png 1024w, https:\/\/cknotes.com\/wp-content\/uploads\/2023\/06\/Pasted-768x181.png 768w\" sizes=\"auto, (max-width: 1430px) 100vw, 1430px\" \/><\/li>\n<li>Click on the blue &#8220;Show raw log&#8221;\u00a0 located on the right side of the console.\u00a0 You will now see the raw log, like this:\u00a0 <img loading=\"lazy\" decoding=\"async\" width=\"1419\" height=\"233\" class=\"alignnone wp-image-2451 size-full\" src=\"https:\/\/cknotes.com\/wp-content\/uploads\/2023\/06\/Pasted-1.png\" srcset=\"https:\/\/cknotes.com\/wp-content\/uploads\/2023\/06\/Pasted-1.png 1419w, https:\/\/cknotes.com\/wp-content\/uploads\/2023\/06\/Pasted-1-300x49.png 300w, https:\/\/cknotes.com\/wp-content\/uploads\/2023\/06\/Pasted-1-1024x168.png 1024w, https:\/\/cknotes.com\/wp-content\/uploads\/2023\/06\/Pasted-1-768x126.png 768w\" sizes=\"auto, (max-width: 1419px) 100vw, 1419px\" \/><\/li>\n<li>Copy the raw HTTP request.\u00a0 In this case, it is:\n<pre>POST \/seguridad\/auth HTTP\/1.1\r\naccess_token: tuTokendeAcceso\r\nContent-Type: application\/x-www-form-urlencoded\r\nUser-Agent: PostmanRuntime\/7.30.0\r\nAccept: *\/*\r\nCache-Control: no-cache\r\nPostman-Token: 9478ec71-e982-4889-8d24-e446c737d191\r\nHost: apitest.dtes.mh.gob.sv\r\nAccept-Encoding: gzip, deflate, br\r\nConnection: keep-alive\r\nContent-Length: 39\r\n \r\nuser=9999999999999999&amp;pwd=aaaaaaaaaaaaa\r\n<\/pre>\n<\/li>\n<li>Go to Chilkat&#8217;s online tool here:\u00a0\u00a0 <a href=\"https:\/\/tools.chilkat.io\/httpRequestToCode\">https:\/\/tools.chilkat.io\/httpRequestToCode<\/a><\/li>\n<li>Copy the above raw HTTP request into the online tool, select your programming language, and generate.<\/li>\n<li>If, for example, you chose to generate FoxPro, your generated code would look like this:\n<pre>\r\nLOCAL loHttp\r\nLOCAL lnSuccess\r\nLOCAL loResp\r\n\r\n* This example assumes the Chilkat API to have been previously unlocked.\r\n* See Global Unlock Sample for sample code.\r\n\r\nloHttp = CreateObject('Chilkat.Http')\r\n\r\nloHttp.SetRequestHeader(\"Accept-Encoding\",\"gzip, deflate, br\")\r\nloHttp.SetRequestHeader(\"Host\",\"apitest.dtes.mh.gob.sv\")\r\nloHttp.SetRequestHeader(\"Content-Type\",\"application\/x-www-form-urlencoded\")\r\nloHttp.SetRequestHeader(\"access_token\",\"tuTokendeAcceso\")\r\nloHttp.SetRequestHeader(\"Postman-Token\",\"9478ec71-e982-4889-8d24-e446c737d191\")\r\nloHttp.SetRequestHeader(\"Connection\",\"keep-alive\")\r\nloHttp.SetRequestHeader(\"Accept\",\"*\/*\")\r\nloHttp.SetRequestHeader(\"User-Agent\",\"PostmanRuntime\/7.30.0\")\r\nloHttp.SetRequestHeader(\"Cache-Control\",\"no-cache\")\r\n\r\nloResp = loHttp.QuickRequest(\"POST\",\"https:\/\/example.com\/seguridad\/auth\")\r\nIF (loHttp.LastMethodSuccess = 0) THEN\r\n    ? loHttp.LastErrorText\r\n    RELEASE loHttp\r\n    CANCEL\r\nENDIF\r\n\r\n? STR(loResp.StatusCode)\r\n? loResp.BodyStr\r\nRELEASE loResp\r\n\r\nRELEASE loHttp\r\n<\/pre>\n<\/li>\n<li>You can remove the line of code that adds the &#8220;Postman-Token&#8221; header, it is not needed.<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is a way to generate Chilkat source code from a working PostMan request: Open Postman: Launch the Postman application on your computer. Create or Import a Request: Create a new request or import an existing one that you want to inspect the raw HTTP request for. Send the Request: Click the &#8220;Send&#8221; button to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[950,799],"tags":[711],"class_list":["post-2449","post","type-post","status-publish","format-standard","hentry","category-postman","category-rest-api","tag-postman"],"_links":{"self":[{"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/posts\/2449","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/comments?post=2449"}],"version-history":[{"count":5,"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/posts\/2449\/revisions"}],"predecessor-version":[{"id":3184,"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/posts\/2449\/revisions\/3184"}],"wp:attachment":[{"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/media?parent=2449"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/categories?post=2449"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/tags?post=2449"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}