<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Post http on interrupt</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/60039/post-http-on-interrupt</link><description>Hello, I have another problem... i work on nrf9160 dk 
 I try to send http post when i pressed button 2 but this doesn&amp;#39;t work.. Below you could see my code who block on printk &amp;quot;http example&amp;quot; and getadrrinfo don&amp;#39;t start.. 
 
 
 
 
 Thank&amp;#39;s for your he</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 15 Apr 2020 12:11:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/60039/post-http-on-interrupt" /><item><title>RE: Post http on interrupt</title><link>https://devzone.nordicsemi.com/thread/244709?ContentTypeID=1</link><pubDate>Wed, 15 Apr 2020 12:11:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab24f9ef-704a-4650-b806-3ba887bd9ed2</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;It seems like it is working then. Could you test that code with your initial&amp;nbsp;HTTP_HOST (not &lt;span&gt;ptsv2.com&lt;/span&gt;)? If that isn&amp;#39;t working, the problem is not with the code, but probably the server you are posting to.&lt;/p&gt;
&lt;p&gt;The reason you see &amp;quot;hel&amp;quot; instead of &amp;quot;hello&amp;quot; is probably because &amp;quot;content-length&amp;quot; is set to 3.&lt;/p&gt;
&lt;p&gt;You may consider using snprintf in your code, which allows you to dynamically change the message you are sending.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Post http on interrupt</title><link>https://devzone.nordicsemi.com/thread/244459?ContentTypeID=1</link><pubDate>Tue, 14 Apr 2020 13:29:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e1b240d-8c1d-47dd-b723-1da64622425e</guid><dc:creator>Maxvi33</dc:creator><description>&lt;p&gt;I try your function and this is the result:&lt;br /&gt;&lt;br /&gt;(15:18:17.972) wait+CEREG: 0,1,&amp;quot;C356&amp;quot;,&amp;quot;001172CE&amp;quot;,9&amp;lt;CR&amp;gt;&lt;br /&gt;(15:18:18.999) OK&amp;lt;CR&amp;gt;&lt;br /&gt;(15:18:18.999) HTTP example&lt;br /&gt;(15:18:18.999) &amp;lt;CR&amp;gt;getaddrinfo err: 0&lt;br /&gt;(15:18:24.319) &amp;lt;CR&amp;gt;client_fd: 3&lt;br /&gt;(15:18:24.319) &amp;lt;CR&amp;gt;bind err: 0&lt;br /&gt;(15:18:24.319) &amp;lt;CR&amp;gt;connect err: 0&lt;br /&gt;(15:18:24.483) &amp;lt;CR&amp;gt;send err: 134&lt;br /&gt;(15:18:24.529) &amp;lt;CR&amp;gt;HTTP example&lt;br /&gt;(15:18:29.495) &amp;lt;CR&amp;gt;getaddrinfo err: 0&lt;br /&gt;(15:18:29.495) &amp;lt;CR&amp;gt;client_fd: 3&lt;br /&gt;(15:18:29.495) &amp;lt;CR&amp;gt;bind err: 0&lt;br /&gt;(15:18:29.542) &amp;lt;CR&amp;gt;connect err: 0&lt;br /&gt;(15:18:30.002) &amp;lt;CR&amp;gt;send err: 134&lt;br /&gt;(15:18:30.002) &amp;lt;CR&amp;gt;HTTP example&lt;br /&gt;(15:18:35.012) &amp;lt;CR&amp;gt;getaddrinfo err: 0&lt;br /&gt;(15:18:35.059) &amp;lt;CR&amp;gt;client_fd: 3&lt;br /&gt;(15:18:35.059) &amp;lt;CR&amp;gt;bind err: 0&lt;br /&gt;(15:18:35.059) &amp;lt;CR&amp;gt;connect err: 0&lt;br /&gt;(15:18:35.748) &amp;lt;CR&amp;gt;send err: 134&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;And on ptsv2.com i see &amp;quot;hel&amp;quot; for payload and not &amp;quot;hello&amp;quot;..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Post http on interrupt</title><link>https://devzone.nordicsemi.com/thread/244433?ContentTypeID=1</link><pubDate>Tue, 14 Apr 2020 12:47:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8ef52d44-e54a-4976-a4ff-47e15a464294</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Is&amp;nbsp;HTTP_HOST a valid addr?&lt;/p&gt;
&lt;p&gt;Does this project work: &lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-7e5e40f2f3824667b703675ef04d6118/http_5F00_post.zip"&gt;devzone.nordicsemi.com/.../http_5F00_post.zip&lt;/a&gt;?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>