Thank you hassan,Here I tried Get http://pastiebin.com/53bc058a14df3 but I m getting 403 error by executing this code. So please correct me I m new to erpnext. And also please give me some examples for Post/Get.
On Tuesday, July 8, 2014 6:35:23 PM UTC+5:30, hassan bellounis wrote:The login method takes as form data the user and the password, whereas the resource takes a dict named data as parameter
The proper way should be to send as form data :
{
data : {
//Your data
}
}
Also POST request are for creating document. So you shouldn't send a name to the document (LEAD0006)
If you're trying to fetch the document send a GET request.
Le mardi 8 juillet 2014 13:22:19 UTC+2, rahul nejanawar a écrit :Hi all,1. I wrote a python code for login using Post and here is the link of my code http://pastiebin.com/53bbce75204fc . When i execute this code it will give output as {"message":"Logged In","full_name":"Administrator"}. I think it is right as given in https://frappe.io/apps/frappe-framework/developers/api/rest_api.2. After that i tried above with ruby code ie http://pastiebin.com/53bbd0729431c it gives output likeusr=Administrator&pwd=admin{"message":"Logged In","full_name":"Administrator"}2003. After that i tried to Post the reorder quantity(re_order_qty) for a particular item(in ruby) and here is the link of my code http://pastiebin.com/53bbd20f59ce8. When i execute this code it will give out put as usr=Administrator&pwd=admin{"message":"Logged In","full_name":"Administrator"}200email_id=sam_sd%40gmail.com{}200In the above out put i not received any response(the response field is empty {}). I tried this in python code also and i found the out put as {}. Here is the link of my python code http://pastiebin.com/53bbd398d84c4 .4. How to get the response of my code to know that Post operation successful. Please help me to write code for that.
--
Note:
If you are posting an issue,
1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
End of Note
---
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/8a8b347d-af74-478c-9821-2e2d0ba395a0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+unsub...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/b90253b8-de3d-49d8-9a49-19f2197b0f4d%40googlegroups.com.