HTTP / 1.1发布到D-Link相机

时间:2017-03-07 04:15:25

标签: http post http-status-code-404

我正在尝试将HTTP POST命令直接用于D-Link DCS-932L相机(我在F / W 1.12上有一个摄像头,在1.14上有另一个摄像头,如果有帮助的话)。我一直收到404 File Not Found错误。

运行Fiddler,我在浏览器中启用了动作并看到了以下请求:

void BtnPage_Clicked(object sender, EventArgs e)
    {
        Task.Run(async () =>
       {
           var file = await Plugin.FilePicker.CrossFilePicker.Current.PickFile();
           var documentPath = await BaseProvider.CacheDocumentAsync(file.FileName, file.DataArray);
           await documentController.NewDocumentAsync(documentPath);

           var page1 = documentController.Pages[0];
           var environment = new Library.Environment();
           environment.SetVisibleWidth((int)skCanvas.Canvas.Width);
           environment.SetVisibleHeight((int)skCanvas.Canvas.Height);
           environment.SetActualWidth((int)page1.ActualWidth);
           environment.SetActualHeight((int)page1.ActualHeight);
           skCanvas.Environment = environment;
           ShowPage(page1);
       });
    }

语法是

POST /setSystemMotion HTTP/1.1

如果我尝试使用完全相同的请求和语法通过Chrome Extension Postman使用HTTP POST命令打开动作

ReplySuccessPage=motion.htm&ReplyErrorPage=motion.htm&MotionDetectionEnable=1&MotionDetectionScheduleDay=0&MotionDetectionScheduleMode=0&MotionDetectionSensitivity=45&ConfigSystemMotion=Save

相机的服务器似乎决定将我的./setSystemMotion路由到此./etc_ro/web/setform文件夹。我很乐意提供更多细节,但任何人都可以了解可能导致这种变化的原因吗?

谢谢!

1 个答案:

答案 0 :(得分:0)

我也有同样的问题。 解决了这个来自以下论坛的curl命令

public class PickupGroupListAdaper extends RecyclerView.Adapter<PickupGroupListAdaper.ViewHolder>{
    private ArrayList<GroupListItems> groupListItemsArrayList;

    //Create new views (invoked by the layout manager)
    @Override
    public PickupGroupListAdaper.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        //Creating a new view
        View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.pickup_group_list,parent,false);

        //set the view's size, margins, paddings and layout parameters

        ViewHolder vh = new ViewHolder(v);
        return vh;
    }

    //Replace the contents of a view (invoked by the layout manager
    @Override
    public void onBindViewHolder(PickupGroupListAdaper.ViewHolder holder, int position) {
        // - get element from arraylist at this position
        // - replace the contents of the view with that element

        GroupListItems groupListItems = groupListItemsArrayList.get(position);
        holder.tv_group_player_email.setText(groupListItems.getPlayer_email());
    }

    @Override
    public int getItemCount() {
        return groupListItemsArrayList.size();
    }

    //Provide a reference to the views for each data item
    //Complex data items may need more than one view per item, and
    //you provide access to all the views for a data item in a view holder
    public class ViewHolder extends RecyclerView.ViewHolder {
        //each data item is just a string in this case

        public TextView tv_group_player_email;
        public ViewHolder(View itemView) {
            super(itemView);
            tv_group_player_email = (TextView)itemView.findViewById(R.id.tv_group_player_email);
        }
    }

    public PickupGroupListAdaper(ArrayList<GroupListItems> groupListItemsArrayList) {
        this.groupListItemsArrayList = groupListItemsArrayList;
    }

}

https://www.developpez.net/forums/d1424172/systemes/hardware/achat-conseils/peripheriques/camera-ip-commandes-url-api-dlink-dcs-932l/#post8858654