Skip to main content
14 events
when toggle format what by license comment
May 29, 2021 at 17:41 vote accept David Todd
May 29, 2021 at 7:35 answer added Kusalananda timeline score: 1
May 29, 2021 at 4:36 vote accept David Todd
May 29, 2021 at 17:41
May 29, 2021 at 4:36 comment added David Todd damn. I am not using right content in my temp.txt file. Now it makes sense. It was a silly mistake on my end. Thanks for helping me with that. Now it works fine.
May 29, 2021 at 4:25 comment added muru Why? {"query":"\n{\n data(clientId: 1234, filters: [{key: \"o\", value: 100}], key: \"world\") {\n title\n type\n pottery {\n text\n pid\n href\n count\n resource\n }\n }\n}"} seems like valid enough JSON.
May 29, 2021 at 4:24 comment added David Todd yeah that I understand but then why it works fine on my first curl request? It shouldn't work for the first case as well right? With that in mind I am just trying to extract body content from outside file instead of hardcoding it in the curl command line.
May 29, 2021 at 4:23 comment added muru Well, if you tell your server you're going to send JSON and then send some garbage at it, what did you expect it to do?
May 29, 2021 at 4:21 comment added David Todd Does it matter in this case? It works fine for my first curl call without any issues but my second curl command only works fine with my Updated "temp.txt" file. I am confuse what I should do so that it can work with my Original "temp.txt" file.
May 29, 2021 at 4:19 comment added muru You say 'Content-Type: application/json, but your original temp.txt is definitely not JSON.
May 29, 2021 at 4:09 history edited David Todd CC BY-SA 4.0
added 2 characters in body
May 29, 2021 at 2:24 history edited David Todd CC BY-SA 4.0
added 14 characters in body
May 29, 2021 at 2:16 history edited David Todd CC BY-SA 4.0
deleted 14 characters in body
May 29, 2021 at 1:56 history edited David Todd CC BY-SA 4.0
added 33 characters in body
May 29, 2021 at 1:50 history asked David Todd CC BY-SA 4.0